Configure AS7 to download .bin rather than .elf?

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Our custom bootloader looks for a "bootloader info block" in any file it loads, and also verifies its CRC once loaded into memory.

 

Our AS7 project has a post-build script that generates a .bin file with the bootloader info block embedded.  Works fine.

 

But when debugging, although AS7 creates the .bin file, it flashes the target device from the .elf file (IIRC) which lacks the bootloader info block, so the bootloader rejects the file.

 

Is there a way to configure the project to load the .bin file instead?

Last Edited: Thu. Sep 2, 2021 - 05:05 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But when debugging,

When debugging your debugging tool would erase the boot loader, no?

 

The .bin file may not have any debugging info.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


First, an apology: I mis-filed this note.  It really belongs under the Atmel Studio (ARM Related) forum, but I think the question still applies:

 

When debugging your debugging tool would erase the boot loader, no?

Normally, yes, but I've set the the checkbox for both the bootloader and the application:

and that is doing the right thing...

The .bin file may not have any debugging info.

That's certainly true!  But the file that the IDE downloads isn't 1:1 equal to the file that the IDE uses for debugging info.  (Evidence: my .elf file is 2593 Kb .  The bin file is 320 Kb.) 

 

Looking at the Tool submenu, it appears that I could select:

... if only I could find info on what the script accepts as inputs, etc.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Let the bootloader flash the app and debug without flashing anything?

https://community.atmel.com/foru...

/Lars

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@lajon:

Let the bootloader flash the app and debug without flashing anything?

Sensible idea, but this bootloader is a bit non-standard in that it (only) reads files from the SD card -- tested and works.

 

But for purposes of high-speed debugging, it would be nice to convince AS7 to load the bin file.  I'm currently investigating the "Managed by Script" setting to see if I can invoke j-link commander to load the .bin file after the build.