2021-08-23 10:25 AM
I'm having a brain fart and can't figure this out. I'm porting an existing project from the STM32F205 series to the STM32L496 series. So I replaced "system_stmf2xx.c" with "system_stml4xx.c" in my project workspace, but my compiler (IAR) isn't picking it up. It looks like the startup_stm32l496xx.s assembly file is making calls into the system file. So where is the startup file included?
2021-08-23 11:49 AM
Is the error from the linker?
In STM32CubeIDE, you would need to ensure system_stml4xx.c is being compiled and passed to the linker. Should be something similar in IAR.
2021-08-23 11:56 AM
The error(s) are actually about variable types being undefined: u8, u16, etc. These are all defined in stm32l4xx.h, so I deduced that's not being included. That header gets called out in system_stm32l4xx.c. system_stm32l4xx.c should actually have about 30 header files under it in the project tree if it was being included properly. I have none.
2021-08-23 12:03 PM
It's going to be easier if you show the exact error message.
2021-08-24 08:51 AM
Here's some of them.
2021-08-24 10:39 AM
https://github.com/STMicroelectronics/cmsis_device_l4/blob/master/Include/stm32l4xx.h
As you see, stm32l4xx.h does not define types "u16", "u8" etc. It rather uses stdint.h.
Also, system_stml4xx.c does not include a lot of .h files.
Confused? the messages come from compiling some other .c file, not system_stml4xx.c
2021-08-24 11:23 AM
Sure looks like the error messages are from "adjust_px5000.c" and not from a system startup file.