I have a project I have inherited but I’m using a different board target but the same MCU target. I’m stuck with MBedOS 5.12 and MBedCLI. Here’s the build command from my Makefile:
mbed compile --build $(OUTDIR) $(VERBOSE) --app-config $(APP_CONFIG) -N $(CURDIR) $(DEFINES)
I have come into a situation where I would like modify my hardware configuration for some manufacturing tests so I would like to support two targets in the same project.
The project uses the .mbed file at the root directory, as near as I can tell, to select the target. I changed the
TARGET= value to match my target. Everything seems to be working find and the correct macros are defined from the
Can I set
TARGET in the my app config .json file? I like this option because it just seems like a nice way to set things up.
mbed compile give precedence to the
--target command line switch or a key in the .mbed file? Or is
--target used to select the MCU, not the target which inherits from an MCU?
Where is the use of the .mbed file described?
Can you point me to the documentation that discusses selecting the target?
I’ve read the MBedOS documentation that discusses how to add targets to the targets.json file but I can’t find documentation that says how to select the target in the config .json files. It is inferred by introducing the
--target switch to
mbed compile but again, not sure if
--target is the MCU or the board. I’m wondering about a config file and just more general documentation on the subject.