Programming the Teensy

Status
Not open for further replies.

jimh54

New member
really noob question. There are four .hex files to program the teensy that i downloaded from the website i purchased the kit from. the teensy programming app only programs the one named "TSynthV2_00.hex". When i load the next one the program erases the teensy and programs that file. what needs to be done to program all four of the files?
Thanks
 
Not sure what Teensy ? And the source of the (4) files?

But all of them run a single HEX at a time - and each may be built for a different Teensy processor? The HEX file is executable for a single program that consumes all of the Teensy it was 'programmed' for - not necessarily filling it - but given exclusive control of the processor unique to that Teensy and the feature set of that Teensy.
 
Use the latest V2.03 version of the firmware and NOTHING else. Also please email the developer of TSynth directly, who'll be delighted to help over email.
 
If you purchased a kit from someone, probably best to first ask them for guidance.

Generally speaking, only a single hex file is meant to be programmed onto Teensy's flash memory. Programming more than 1 hex file is so unusual that I'm going to guess your question is based on a misunderstanding. Admittedly that is some guesswork on my part, since you didn't give as a link to the hex files or any other info.

But to specifically answer your question:

what needs to be done to program all four of the files?

First, you would need to inspect the address ranges used by each file. HEX files are just ASCII text, so you can read them with any text editor. 4 characters on each line specify the 16 bit address for that line's data, and additional lines set the upper 16 bits for lines which follow them, for full 32 bit addresses.

Intel HEX is a very old and well known data format. You can find documentation on lots of websites about what the numbers on each line mean. You will need to learn this to inspect the lines of data and determine their addresses.

If any addresses conflict, first that's a very sure sign these HEX files were not meant to be used together! But if you're still determined to move forward anyway, you'll need to delete the conflicting data from one or more files, so that each address in your Teensy has data from only 1 source.

Each HEX file will have any eof-of-file record. Usually it's the last line. You will need to delete this from the first 3 files.

Then just concatenate all the data. You could use the unix "cat" command if using Linux or MacOS. I'm not sure if Windows provides such a command. Or you could just copy and paste all the line in your text editor. The final result will be all the lines from all 4 files, but with only a single end-of-file record.

Each file usually will begin with one of those lines which sets the upper 16 bits of the address. Before merging all the lines, check for this. You wouldn't want the upper 16 bits from one file to affect data from another. But what to do if some files begin with data lines and don't have the upper 16 bit line first is a hard choice to make. Almost all HEX files created for 32 bit boards like Teensy begin with an upper 16 bit address line.

But again, combining the data into a single large HEX file is almost certainly not the right path. It can be done, but this sort of hacking and fiddling with HEX files is rarely needed. HEX files people publish are almost always complete and not meant to be combined together with other HEX files.
 
Status
Not open for further replies.
Back
Top