Is it possible to program .hex file without build from CodeVisionAVR?

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

Ok, so this is the situation:

 

I have this code, kept in version control system (git), and I have different .hex files versions there, all produced with CodeVisionAVR.

 

Typically, I can just Project/"Build All" in CVAVR, compilation linking etc will complete, then I'm asked to "Program the chip", I click on that, and the chip gets programmed.

 

There is something called Tools / Chip Programmer in CVAVR, but apparently it is just to set settings for the programmer (Atmel ICE in my case) - I cannot see any option to load a .hex file.

 

So, is it possible to use CVAVR, to load in a .hex file, and program it - without running the build (compilation, linking) step?

 

Last Edited: Fri. Jul 12, 2019 - 09:17 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


sdbbs wrote:
here is something called Tools / Chip Programmer in CVAVR, but apparently it is just to set settings for the programmer (Atmel ICE in my case) - I cannot see any option to load a .hex file.
Eh?

 

Page 120:  http://www.arctan.ca/files/cvavrman326.pdf

 

 

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

Many thanks, @clawson - I should have probably noted, that I did check the File menu in the chip programmer, and this is what it shows on my version, 3.34 Advanced:

 

cvavr_3.34_chip_prog.png

 

It says Load/Save ELF, Load/Save Flash, Load/Save EEPROM - no Load/Save HEX.

 

Unless I'm supposed to use Load/Save ELF for HEX too? (In which case, it is a very confusing user interface, at least for me - when I read ELF, I always guess it means just "ELF", not "ELF and/or whatever else")

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

What happens when you use "Load Flash" then? Surely it offers .hex as an option??

 

You want to load a file to be programmed into your flash I would have thought "Load Flash" was the obvious choice, no?

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

As Cliff has shown.   You can program any HEX to any chip supported by your programmer.

 

You can also Read, Edit, ... , Save the existing contents of your chip.

Or Read, Edit, ... the HEX file before programming.

 

e.g. you can alter serial numbers,  text strings or data after compilation.

 

David.

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

Many thanks, @clawson:

 

clawson wrote:

What happens when you use "Load Flash" then? Surely it offers .hex as an option??

 

Yes - it does! Thanks a ton for this, problem solved! :)

 

clawson wrote:

You want to load a file to be programmed into your flash I would have thought "Load Flash" was the obvious choice, no?

 

Wasn't to me before you mentioned it (although, now that you mentioned it, of course, it makes sense) - and when I'm expected to do things "NOW", my brain reverts to looking for explicit mentions of things, unfortunately.

 

I guess, if I was writing the documentation, I'd put something like "You can load or save the contents of these buffers using the File menu. With File/Load FLASH and File/Save FLASH, you can use the formats: Intel HEX files (.hex), ROM files (.rom) and Binary Files (.bin)."

 

Thanks again!

 

-----------------------

 

EDIT: Just to note this - these are the steps I've tried, to burn/program the .hex file on chip, without build:

 

  • Open the project in CVAVR, just to make sure the tool (chip programmer) settings are correct
  • In CVAVR Chip Programmer: File/Load FLASH, Files of type: Intel HEX files (*.hex), load the right .hex file
  • After that, if you press Program/Flash from main menu toolbar, it may fail with some error (Verification something-something, didn't save full error message and cannot reproduce it now)
  • Then, if you press Program All button instead, you might get an error "The 'EEPROM|Program' and 'Preserve EEPROM' options are conflicting. Please disable one of them."
  • Then I disable the "Program" Checkbox in the EEPROM section (under Program All button), and leave "Preserve EEPROM" at bottom checked; finally I click the "Program All" button, and it works.

 

Last Edited: Mon. Jul 15, 2019 - 07:36 AM