Hi there.
I’ve started working on adding support for 1Bitsy which is based on an STM32F415RGT6.
I’m stuck literally at the first step, I’ve created a custom_targets.json
file which contains the following, which I figured was the minimum possible starting point:
{
"1BITSY": {
"inherits": ["MCU_STM32F4"],
"device_name": "STM32F415RG"
}
}
When I run mbed compile -m 1BITSY -t GCC_ARM
both on my Mac and inside a mbedos/mbed-os-env
docker container I get the following error:
[mbed] Working path "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy" (program)
Traceback (most recent call last):
File "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy/mbed-os/tools/targets/__init__.py", line 157, in target
resolution_order = get_resolution_order(json_data, name, [])
File "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy/mbed-os/tools/targets/__init__.py", line 145, in get_resolution_order
order = get_resolution_order(json_data, par, order, level + 1)
File "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy/mbed-os/tools/targets/__init__.py", line 143, in get_resolution_order
parents = json_data[target_name].get("inherits", [])
KeyError: 'MCU_STM32F4'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy/mbed-os/tools/make.py", line 412, in <module>
main()
File "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy/mbed-os/tools/make.py", line 309, in main
mcu = extract_mcus(parser, options)[0]
File "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy/mbed-os/tools/options.py", line 146, in extract_mcus
update_target_data()
File "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy/mbed-os/tools/targets/__init__.py", line 800, in update_target_data
TARGETS[:] = [Target.get_target(tgt) for tgt, obj
File "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy/mbed-os/tools/targets/__init__.py", line 800, in <listcomp>
TARGETS[:] = [Target.get_target(tgt) for tgt, obj
File "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy/mbed-os/tools/targets/__init__.py", line 113, in wrapper
CACHES[(func.__name__, args)] = func(*args, **kwargs)
File "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy/mbed-os/tools/targets/__init__.py", line 368, in get_target
return target(target_name, Target.get_json_target_data())
File "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy/mbed-os/tools/targets/__init__.py", line 159, in target
raise_from(NotSupportedException(
File "/usr/local/lib/python3.8/site-packages/future/utils/__init__.py", line 398, in raise_from
exec(execstr, myglobals, mylocals)
File "<string>", line 1, in <module>
tools.utils.NotSupportedException: target 1BITSY has an incomplete target definition
[mbed] ERROR: "/usr/local/opt/python@3.8/bin/python3.8" returned error.
Code: 1
Path: "/Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy"
Command: "/usr/local/opt/python@3.8/bin/python3.8 -u /Users/jimsy/Dev/gitlab.com/jimsy/mbed-os-1bitsy/mbed-os/tools/make.py -t GCC_ARM -m 1BITSY --source . --build ./BUILD/1BITSY/GCC_ARM"
Tip: You could retry the last command with "-v" flag for verbose output
---
I have made a TARGET_1BITSY
directory and copied PeripheralPins.c
and PinNames.h
from a similar board.
Obviously I’ve done something particularly dumb. Can anyone point out my mistake?
Thanks!