Skip to main content
Visitor II
May 9, 2024
Question

how to merge bootloader and application bin

  • May 9, 2024
  • 4 replies
  • 2585 views

hello ST users,

 

i was trying to merge bootloader bin file and application bin file any possible solutions please help me .

    This topic has been closed for replies.

    4 replies

    Graduate II
    May 9, 2024

    Could you use C file functions? fopen, fread, fwrite, fclose ?

    COPY  /b  a.bin+b.bin  c.bin

    Most situations you actually want to convey meta-data like address and size, sort of thing an OBJECT FILE would do?

    See also .DFU for a standardized/documented format for encapsulating binary data.

    Visitor II
    May 10, 2024

    Use Srecord, or .....

     

    In linker script of your aplication :

    Create proper memory region for BOOTLOADER

    and....

    TARGET(binary)
    
    INPUT(bootloader.bin)
    
    OUTPUT_FORMAT(default)
    
    TARGET(default)
    
    
    SECTIONS
    
    {
    
     .bootloader :
    
     {
    
     bootloader.bin (.data)
    
     . = ALIGN (0x4);
    
     } > BOOTROM

     

    predd.21Author
    Visitor II
    May 16, 2024

    i have modified in the linker script of applicationi have modified in the linker script of applicationin application adding linker pathin application adding linker pathplepplerrorerror

    predd.21Author
    Visitor II
    May 16, 2024

    PLEASE CHECK THIS ERROR

    make -j8 all

    arm-none-eabi-gcc -o "appl.elf" @"objects.list" -Wl,--start-group -Wl,--end-group -mcpu=cortex-m0plus -T"C:\Users\91910\STM32CubeIDE\workspace_1.14.1\appl\STM32G0B1CBTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="appl.map" -Wl,--cref -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

    C:/ST/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe:C:\Users\91910\STM32CubeIDE\workspace_1.14.1\appl\STM32G0B1CBTX_FLASH.ld:78: ignoring invalid character `\342' in script

    C:/ST/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe:C:\Users\91910\STM32CubeIDE\workspace_1.14.1\appl\STM32G0B1CBTX_FLASH.ld:78: ignoring invalid character `\200' in script

    C:/ST/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe:C:\Users\91910\STM32CubeIDE\workspace_1.14.1\appl\STM32G0B1CBTX_FLASH.ld:78: ignoring invalid character `\215' in script

    Graduate II
    May 10, 2024

    Explain for what, why not two hex merge?

    Visitor II
    May 16, 2024

    Some wrong character,   format correcly added lines in linker script, (maybe some unprintable sign was added)