2024-02-23 10:22 AM
Hello to all
i have build my project as programmer on stm32f103c8t6 to connect as master host to slave one stm32f103c8t6 and program the slave device with code which saved in eeprom connected to the master with i2c it working well with me but I need to remove the eeprom and link the file to the master host programmer as a part of the code generate
2024-02-23 11:03 AM
In a .s file (assembler source)
.section .databin
.incbin "data.bin"
In the .ld file (linker script)
.data : {
*(.databin*)
}
Or export/dump formatted as a uint8_t array, and add that to your code, or as an include file.
2024-02-24 06:59 AM
MAY BE YOU NOT UNDERSTAND ME I WANT TO ADD EXTERNAL BIN FILE TO INCLUDE IN THE CODE SO WHEN I COMPILING THE CODE IT GENERATE THE CODE WITH THIS BIN FILE AS APART OF THE CODE
FOR EXAMPLE I WANT TO FILE CALL Slave.bin TO INCLUDE TO MY CODE FROM ADDRESS 0X800F000
THIS FILE SIZE 2048 BYTE
2024-02-24 08:04 AM
now i add
.section .databin
.incbin "Slave.bin" at the end of the file /Startup/startup_stm32f103c8tx.s and compile it got the bin file at the code and i can find it but t need an option to set fixed start address in the flash for this file
2024-02-24 12:08 PM
Reduce one of the MEMORY sections in the Linker Script, and create another describing the region you want the .BIN data to live, and then drive that data into that section
.data : {
*(.databin*)
} >BINFLASH
Also please try not to post in ALL-CAPS, this is generally frowned upon in email and forum communications.