Skip to main content
wfarid
Associate II
January 21, 2011
Question

Loading multiple executables on the STM32 flash memory

  • January 21, 2011
  • 14 replies
  • 4338 views
Posted on January 21, 2011 at 23:41

Loading multiple executables on the STM32 flash memory

    This topic has been closed for replies.

    14 replies

    Tesla DeLorean
    Guru
    March 13, 2015
    Posted on March 13, 2015 at 13:11

    There may be several general apps, you might find you have to reread the instructions every time you pick them up. As Jan mentions, srecords, is perhaps a good starting point and one that recognizes many input formats.

    At a binary level I think of these as throw-away apps, something that can be coded in 5-10 minutes to perform a very specific task, I've coded hundreds of them, a lot of them historically did byte/word swapping, of byte/word splitting, to generate gold images for EPROM programmers, and run as part of the make process.

    Generally such a tool will use C staples like fopen/fclose/fseek/fread/fwrite, malloc/free, memset/memcpy.

    I've also built much more complicated solutions, that can take and output, hex and object files, and translate between formats.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    jdcowpland
    Associate III
    March 13, 2015
    Posted on March 13, 2015 at 17:49

    In case anyone else is interested, I managed to achieve what I was after by creating a single dfu file out of the two binaries, programmed my arm chip with the dfuse app, and then extracted the binary from the chip using the ST Link, and voila- one single binary. Does the job.

    jeff2
    Visitor II
    June 3, 2015
    Posted on June 03, 2015 at 23:03

    I'm working on combined DFU/CDC flash image and you can also just use dd to zero pad out the first bin file and then use cat to append the second bin file to create a single flash image. 

    jeff

    Tesla DeLorean
    Guru
    June 3, 2015
    Posted on June 04, 2015 at 00:29

    Probably, but I'd be tempted to code a small app to automate the work, basically padding out the the right size, and making sure everything fit in the right spots and is suitably checksummed.

    In DOS two binary files can get concatenated with

    COPY  /B  A.BIN+B.BIN  C.BIN

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..