project-generator / project_generator

Project generators for various embedded tools (IDE). IAR, uVision, Makefile, CoIDE, Eclipse and many more in the roadmap!
Apache License 2.0
271 stars 96 forks source link

Fix the compatibility of armcc with static libraries #483

Closed ming180 closed 3 years ago

ming180 commented 3 years ago
  1. armcc uses --userlibpath to specify the library path;
  2. after armasm uses the --pd "__MICROLIB SETA 1" parameter, a build error occurs when using the windows path (....\cmsis\Device\ST\STM32F4xx\Source\Templates\gcc_ride7/startup_stm32f40_41xxx.s), so change the files to a Unix-like path.
ming180 commented 3 years ago

Is this bad rebase? Or all changes are relevant ? Please verify

Adding quotation marks to user lib path and LD SCRIPT can also solve these path problems. Regarding the parameters of armasm (--pd "MICROLIB SETA 1"), I changed it to (--pd 'MICROLIB SETA 1') in the yaml file, which can also solve the following compilation errors

armasm --fpu=FPv4-SP --cpu cortex-m4 --thumb --pd "__MICROLIB SETA 1" ....\bsp\stm32\cmsis\Device\ST\STM32F4xx\Source\Templates\arm/startup_stm32f40_41xxx.s -o build/startup_stm32f40_41xxx.o Fatal error: A1023E: File "....bspstm32cmsisDeviceSTSTM32F4xxSourceTemplatesarm/startup_stm32f40_41xxx.s" could not be opened: No such file or directory 1 Error, 0 Warnings