2026-05-29 7:13 AM
Hello,
I have just updated STM32CubeAI Studio to version 1.2.
In the previous version, the AI Studio generated:
My workflow was to add the middleware and application code to my project, then convert the raw file (network_atonbuf.xSPI2.raw) to a hex file. Everything worked fine until I updated the studio.
In version 1.2, instead of generating the raw file, it now generates a C source file: network_atonbuf.xSPI2.c.
I am unsure what to do with this new .c file. I placed it in my project, but nothing works as expected.
Could someone please advise on how to proceed or explain the change in workflow?
Solved! Go to Solution.
2026-05-29 9:11 AM - edited 2026-05-29 9:13 AM
Hello @pawatJoy
with this new update, STM32Cube AI Studio uses the ability to generate weights as C code instead of binary file.
If you want to reuse the same behavior as before, you can go to:
Target > Memory Pool
and, at the far bottom, under Weights Mapping:
Usage of C file is easier to integrate in your application since you can ship one unique .elf / .bin file containing the whole app. However, it means you need to edit your linker script and add a macro to map the weights where you want.
Best regards,
Yanis
2026-05-29 9:11 AM - edited 2026-05-29 9:13 AM
Hello @pawatJoy
with this new update, STM32Cube AI Studio uses the ability to generate weights as C code instead of binary file.
If you want to reuse the same behavior as before, you can go to:
Target > Memory Pool
and, at the far bottom, under Weights Mapping:
Usage of C file is easier to integrate in your application since you can ship one unique .elf / .bin file containing the whole app. However, it means you need to edit your linker script and add a macro to map the weights where you want.
Best regards,
Yanis
2026-05-29 9:44 AM
Thank you for your useful information.
Can I ask another question? If I want to use that C file, how should I edit my Linker script (.ld)?
2026-06-01 12:32 AM - edited 2026-06-01 12:39 AM
Hello @pawatJoy
It depends how you want to integrate your network, but if you want to map your weights in 0x7100_0000, you will need to do the following. It is only a proposal, and can be fine-tuned based on your board and what you want to achieve:
- Create a section (memory definition) in your linker script, starting from the address you want:
```
For more information, you can refer to the LD documentation here, especially the Memory Layout section:
Using LD, the GNU linker - Command Language
If you want to put your weights in the same section as "ROM", you can integrate your C file as-is. No modification needed. However, your ROM should have enough space in order to compile and not have an overflow.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.