Closed 16L-YT closed 3 years ago
I have the same issue with a custom STM32F4. Related to: https://github.com/ARMmbed/mbed-tools/pull/160
In this case, the files are located under targets/TARGET_Ambiq_Micro/TARGET_Apollo3/device
. Isn't this in the include paths? Also sdk should be added.
This is taken from the CMakeLists.txt located in TARGET_Apollo3 directory:
target_include_directories(mbed-apollo3
INTERFACE
device
sdk/CMSIS/AmbiqMicro/Include
sdk/mcu
sdk/mcu/apollo3
sdk/mcu/apollo3/hal
sdk/mcu/apollo3/regs
)
I assume this is not propagated ?
Yes. I checked the mentioned CMakeLists.txt, and it indeed has 'device' directory.
it has but the problem could be it is not propagated. Can you look at CMake generated files what paths look like?
anyway, can anyone provide a branch to test this - reproduce locally the error?
Now that I notice the custom board guide has been updated, I realized that I might not have done the CMake integration properly. I'll see if I can get it working by following the guide.
I can confirm that by following the guide and integrating into CMake correctly (hint: one must link the custom target to the derived SoC, e.g. mbed-stm32f412xg
) I managed to resolve the errors.
I think the updated porting guide should be referenced by a "migration guide" of some sorts.
Thanks @boraozgen for confirming. We will review the reference.
@16L-YT issue resolved as well?
@0xc0170 Yes I finally managed to make it work. I was using a name for the new target library name in the CMakeLists.txt, inside the new target folder, like this one: mbed-slab-dk. while the target folder name is TARGET_SIXTEENLAB_DK. After checking other target names I found them all are using the the same target folder name with lower case ( meaning: mbed-sixteenlab-dk), and it worked. I'm not good with CMake to know why it was wrong.
I vote to add this as a note the guide.
Thanks @boraozgen , your comment helped me too much.
Describe the bug
I am trying to build my project using CLI2. I already have a working project using Mbed Studio. Furthermore, I have a target I added to
targets.json
inherits AMA3B1KK and FAMILY_Apollo3. I already raised a question on the forum, after reading and doing several trials, I think I did all required steps correctly, but I still have missed some header file while compilation as shown in the log below. However, I find that some targets includes a mbed_rtx.h , device.h , cmsis.h in their target folder. Yet, in Ambiq-based targets these are in (targets\TARGET_Ambiq_Micro\TARGET_Apollo3\device).To Reproduce Steps to reproduce the behavior:
Expected behavior Compiling successfully.
Screenshots N/A
Desktop (please complete the following information):
Mbed (please complete the following information):
Additional context N/A