Dear all,
I have a problem with a program that I downloaded from internet. It refuses to compile for the board it was designed for. So it probably worked in the past. Now it is not working anymore. From the research I have done it is probably because of the board.json file.
Hereby the error I am getting.
> Executing task in folder 0 Origineel firmware: pio run <
Warning! `env_default` configuration option in section [platformio] is deprecated and will be removed in the next release! Please use `default_envs` instead
Processing BIGTREE_S42B_V1_0 (platform: ststm32; framework: stm32cube; board: STM32F030C8)
-------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/STM32F030C8.html
PLATFORM: ST STM32 (11.0.0) > STM32F030C8 (8k RAM. 64k Flash)
HARDWARE: STM32F030C8T6 48MHz, 8KB RAM, 64KB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES:
- framework-stm32cubef0 1.11.1
- tool-ldscripts-ststm32 0.1.0
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
AssertionError: Missing MCU or Product Line field:
File "/home/frank/.platformio/penv/lib/python3.6/site-packages/platformio/builder/main.py", line 170:
env.SConscript("$BUILD_SCRIPT")
File "/home/frank/.platformio/packages/tool-scons/scons-local-4.0.1/SCons/Script/SConscript.py", line 598:
return _SConscript(self.fs, *files, **subst_kw)
File "/home/frank/.platformio/packages/tool-scons/scons-local-4.0.1/SCons/Script/SConscript.py", line 287:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "/home/frank/.platformio/platforms/ststm32/builder/main.py", line 99:
target_elf = env.BuildProgram()
File "/home/frank/.platformio/packages/tool-scons/scons-local-4.0.1/SCons/Environment.py", line 219:
return self.method(*nargs, **kwargs)
File "/home/frank/.platformio/penv/lib/python3.6/site-packages/platformio/builder/tools/platformio.py", line 61:
env.ProcessProgramDeps()
File "/home/frank/.platformio/packages/tool-scons/scons-local-4.0.1/SCons/Environment.py", line 219:
return self.method(*nargs, **kwargs)
File "/home/frank/.platformio/penv/lib/python3.6/site-packages/platformio/builder/tools/platformio.py", line 127:
env.BuildFrameworks(env.get("PIOFRAMEWORK"))
File "/home/frank/.platformio/packages/tool-scons/scons-local-4.0.1/SCons/Environment.py", line 219:
return self.method(*nargs, **kwargs)
File "/home/frank/.platformio/penv/lib/python3.6/site-packages/platformio/builder/tools/platformio.py", line 342:
SConscript(env.GetFrameworkScript(f), exports="env")
File "/home/frank/.platformio/packages/tool-scons/scons-local-4.0.1/SCons/Script/SConscript.py", line 661:
return method(*args, **kw)
File "/home/frank/.platformio/packages/tool-scons/scons-local-4.0.1/SCons/Script/SConscript.py", line 598:
return _SConscript(self.fs, *files, **subst_kw)
File "/home/frank/.platformio/packages/tool-scons/scons-local-4.0.1/SCons/Script/SConscript.py", line 287:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "/home/frank/.platformio/platforms/ststm32/builder/frameworks/stm32cube.py", line 43:
assert PRODUCT_LINE, "Missing MCU or Product Line field"
==================================================== [FAILED] Took 0.44 seconds ====================================================
The terminal process "pio 'run'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
The STM32F030C8.json file looks like this
{
"build": {
"core": "stm32",
"cpu": "cortex-m0",
"extra_flags": "-DSTM32F030x8",
"f_cpu": "48000000L",
"hwids": [
[
"0x1EAF",
"0x0003"
],
[
"0x1EAF",
"0x0004"
]
],
"ldscript": "STM32F030C8_FLASH.ld",
"mcu": "stm32f030c8t6",
"variant": "stm32f0"
},
"debug": {
"jlink_device": "STM32F030c8t6",
"openocd_target": "stm32f0x",
"svd_path": "STM32F030xx.svd"
},
"frameworks": [
"arduino",
"libopencm3",
"stm32cube",
"cmsis"
],
"name": "STM32F030C8 (8k RAM. 64k Flash)",
"upload": {
"disable_flushing": false,
"maximum_ram_size": 8192,
"maximum_size": 65536,
"protocol": "stlink",
"protocols": [
"cmsis-dap",
"jlink",
"stlink",
"blackmagic",
"serial",
"dfu"
],
"require_upload_port": true,
"use_1200bps_touch": false,
"wait_for_upload_port": false
},
"url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f0-series/stm32f030/stm32f030c8.html",
"vendor": "Generic"
}
Any help would be greatly appreciated!
Edit:
I tried one last thing. I placed this into the platformio.ini file
platform = ststm32
framework = stm32cube
board = disco_f030r8
upload_protocol = stlink
I don’t think this is the right board though. Now I am getting the fallowing error.
Error: timed out while waiting for target halted
embedded:startup.tcl:521: Error: Unable to reset target