0

I am making a project with the Teensy 3.1 microcontroller. This Teensy uses the MK20DX256VLH7 Cortex-M4 processor, which is supported by IAR. However, Teensy only has examples for Arduino software (which I am not using) and avr-gcc (which I would rather not use). It has its own bootloader (which detects a button press and goes into USB programming mode) and (I believe) its own particular memory layout.

What steps do I have to take to get IAR to generate .hex files that can be used by the Teensy downloader application, and run on the board using the default bootloader?

Dan
  • 12,409
  • 3
  • 50
  • 87

1 Answers1

1

The IAR ARM embedded workbench can produce alternative output. In the project options for your project look for the "Output Converter" selection in the "Category" panel. This will allow you to generate an additional output from the linker of your chosen format. Intel hex is one of the choices.

andy mango
  • 1,526
  • 1
  • 8
  • 13
  • It's really that simple? There's nothing else I need to do? – Dan Mar 06 '14 at 14:11
  • That's what I do, although I'm usually creating binary files instead of Intel hex files. Did it not work for you? – andy mango Mar 07 '14 at 20:13
  • It worked, but there were a few more steps, including setting up ISRs, getting the `__low_level_init` to set up the clock and peripherals, and adding a section that does something with the flash memory that I still don't fully understand. – Dan Mar 08 '14 at 15:09
  • If there is a bootloader, then your application needs to be located at the address the bootloader will jump to. The linker config file in IAR (*.icf) defines where in flash the app will be placed. Your vector table has to be located there and the VTOR register has to be updated to point to it. That is probably done in your __low_level_init function. – Erik Mar 27 '14 at 05:47