Edit: code-fragment & link deleted
Hi,
i tried to make a simple bootloader for Teensy 3.x. Just for fun (for me), and because there are so many requests.
It should
(Step 1) copy a file "flash.bin" from SD to the upper half of the flash (this works)
(Step 2) copy the upper half of the flash to the lower half (this works NOT)
Maybe if have forgotten something important or something is wrong.. but i can't find it.
The problematic "Step 2" (name of the function is "flashcpy()")
- runs in RAM(with "FASTRUN")
- disables interrupts
- erases the lower flash-sectors
- copies the data to FlexRAM in 1024-Byte steps
- flashes the data from FlexRAM
- resets the teensy
Edit: flashEraseSector() and flashProgramSector() seem to work, they are used in "Step 1" too.
Creating the flash.bin file with a batch (works), target dir is c:\temp, takes the last built-project:
How to use:
Edit: The problematic function is commented-out at the moment - see last line of bootloader.cpp
Hi,
i tried to make a simple bootloader for Teensy 3.x. Just for fun (for me), and because there are so many requests.
It should
(Step 1) copy a file "flash.bin" from SD to the upper half of the flash (this works)
(Step 2) copy the upper half of the flash to the lower half (this works NOT)
Maybe if have forgotten something important or something is wrong.. but i can't find it.
The problematic "Step 2" (name of the function is "flashcpy()")
- runs in RAM(with "FASTRUN")
- disables interrupts
- erases the lower flash-sectors
- copies the data to FlexRAM in 1024-Byte steps
- flashes the data from FlexRAM
- resets the teensy
Edit: flashEraseSector() and flashProgramSector() seem to work, they are used in "Step 1" too.
Creating the flash.bin file with a batch (works), target dir is c:\temp, takes the last built-project:
Code:
deleted
How to use:
Code:
deleted.
Edit: The problematic function is commented-out at the moment - see last line of bootloader.cpp
Last edited: