1

I'm currently working with the teensy 4.0 and I heart that it uses a proprietary bootloader.

So my initial thought were to dump it and reverse it, to see what's going on.

A little bit info to the teensy 4.0 It uses the iMXRT1062 from NXP, the bootloader isn't even stored anywhere in the main chip's memory. It is permanently stored inside the separate MKL02 chip. You cannot use a JTAG/SWD debugger, because (if I have understood it correctly) the external chip uses this to write the program to the chip's flash memory.

My goal is to write some bare-metal-drivers for simple usage and I thought this would be a cool challenge ^^

Lockna
  • 691
  • 1
  • 8
  • 24
  • 1
    Find a better development platform, the teensy is too closed of a design to be much use. You can use their tools if you can get them to work to load a bare metal program (well I got it to work on an older teensy), but is it really worth it? You can get developer friendly boards for less. – old_timer Aug 25 '20 at 12:53
  • Do you have a stackoveflow question? – old_timer Aug 25 '20 at 12:55
  • It is actually not difficult to get a bare-metal program running. I use Rust, so I can just compile on cortex-m7 with the rust-toolchain and then I have to convert it into a hex file. Uploading/flashing is easy with the cli tool from them. And I got the board as a present – Lockna Aug 25 '20 at 12:57
  • After experiencing their products and their approach I avoid them as a general rule at this point, can find or build something better for less. – old_timer Aug 25 '20 at 13:15
  • If they have improved their loader tools then that is good to hear. – old_timer Aug 25 '20 at 13:17
  • So even more confused as to what your question is, if you want to write baremetal code for that chip it has nothing to do with teensy nor its loading solution. – old_timer Aug 25 '20 at 13:19
  • Ok, what could I do with other board, what I can't do with the teensy? – Lockna Aug 25 '20 at 13:21
  • Yeah, sorry. My question is how I could dump the bootloader from the external chip – Lockna Aug 25 '20 at 13:22
  • debug with swd for starters, full access to the chip. Your comments dont match the question, and the question is not yet a stackoverflow question, what is the question you are trying to ask? How to find some external information or resource? – old_timer Aug 25 '20 at 13:22
  • I asked what disadvantages the teensy has, because you said I should get another. I wanted to ask how I should approach this "problem" – Lockna Aug 25 '20 at 13:28
  • You need to go after the MKL02Z32VFG4 it appears (pjrc is more open than it used to be so that is good to see) and/or look at the main mcu and see if there are other boot modes (like usb) and what you have to strap to do that. Best to just leave it as is if you have a tool that allows you to load whatever you want into the target mcu, you can use some other board to learn to bit bang swd with an mcu. Get the documentation for each of these chips. – old_timer Aug 25 '20 at 13:30
  • It is possible that they pre-program these parts but likely that they have pads or some solution to program after assembled you may be able to take advantage of that to get into the front end mcu via swd or other. Schematics is nice, layout would be even better. (based on statements of yours assuming that this is a front end programming mcu) – old_timer Aug 25 '20 at 13:32
  • if you want to write code/libraries for the target mcu none of this is required if you have a tool that lets you load programs into that mcu. – old_timer Aug 25 '20 at 13:35
  • My experience from them is closed source, closed design solution, have to hack your way through to get at the mcu and write your own software (completely). When other boards which also may have proprietary debug front ends, but allowed for removal of those front ends, or alternate access to the chip to give full access, and the boards at that time that were cheaper. It appears pjrc is doing a better job now IMO, but I will always have that bad taste, I generally make my own breakout boards now, so I rarely buy any boards like these any more. if I do it is usually from st or ti. – old_timer Aug 25 '20 at 13:43
  • A cortex-m7 board at this price point is very interesting though. – old_timer Aug 25 '20 at 13:44
  • if they provide a tool to program the target mcu completely, and they provide schematics (which they do), and it is not a grossly over priced board (read: Arduino), and they provide enough I/O, expose enough of the chip features (uart, spi, i2c, etc), then it is a perfectly fine board for baremetal development to learn or make libraries for the target mcu. I didnt research it too much didnt look at this cli tool nor do I own one but it sounds like it may be a perfectly fine board. – old_timer Aug 25 '20 at 13:48
  • Yeah, the bootloader wouldn't be for the driver development, only for my interest in how it works. I have read some of the mcu datasheet, I can use the GPIO's for uart/spi etc. Thanks for answering so detailed – Lockna Aug 25 '20 at 15:14

0 Answers0