Question: If not 'using PlatformIO/Arduino IDE' - what leads up to 'need to push a button or bridge the boot pad' when an upload is desired?
Thanks very much. I would like this to be a feature on the Teensy Loader. I wish the Teensy platform was more geared towards finished products, rather than hobbyists and one-offs. I can put a button on my product and a 'firmware flash' hole, but if a change to the software can be made, that would benefit all of us.
created buffer = 0K FLASH (60FFC000 - 60FFC000)
++++ Firmware update ++++
reading hex lines...
abort - max address 60000010 too large
Hello, is there somewhere I can ask questions? I'm getting the following:
I'm trying to flash a 1.2MB firmware file, I'm sure the 0K FLASH part is the problem!
SDClass::setMediaDetectPin(27)SD card is connected
target = fw_teensyMM (16384K flash in 4K sectors)
created buffer = 15640K FLASH (6007A000 - 60FC0000)
++++ Firmware update ++++
reading hex lines...
hex file: 27916 lines 446464 bytes (60000000 - 6006D000)
abort - new code missing string fw_teensyMM
erase FLASH buffer / free RAM buffer...
// get user input to write to flash or abort
int user_lines = -1;
while (user_lines != hex.lines && user_lines != 0) {
out->printf( "enter %d to flash or 0 to abort\n", hex.lines );
read_ascii_line( out, line, sizeof(line) );
sscanf( line, "%d", &user_lines );
}
Where is this string expected to be in the new firmware? Also, can user input be bypassed? I want it to just happen at boot-up:
#define FLASH_SIZE (0x1000000) // 16MB
and
#define FLASH_RESERVE (64 * FLASH_SECTOR_SIZE) // reserve top of flash
++++ Firmware update ++++
target = fw_teensyMM (16384K flash in 4K sectors)
buffer = 15640K FLASH (6007A000 - 60FC0000)
waiting for hex lines...
Write Block flash_write_block 1611112448
Write Block flash_write_block 1611112452
Write Block flash_write_block 1611112456
Write Block flash_write_block 1611112460
... lines removed
Write Block flash_write_block 1611604976
Write Block flash_write_block 1611604980
Write Block flash_write_block 1611604984
Write Block flash_write_block 1611604988
hex file: 30800 lines 492544 bytes (60000000 - 60078400)
New firmware contains correct target ID fw_teensyMM
Delete firmware from SD card: firmware.hex
Erase Sector flash_move 1610612736
Write flash_move 1610612736
Write flash_move 1610612740
Write flash_move 1610612744
... lines removed
Write flash_move 1610659012
Write flash_move 1610659016
Write flash_move 1610659020
...
Any thoughts would be gratefully received. Is any routine being missed during the flashing process?
Have not worked with current Flasher code at all - but that 8MB limit on 16MB Flash may be to assure that at least HALF of the flash is reserved for the process? And to locate the start point for the load area?
Years back on T_3.2 - did test with Frank B on his software flashing that worked and halves were smaller back then.
#elif defined(__IMXRT1062__) && defined(ARDUINO_TEENSY_MICROMOD)
#define FLASH_ID "fw_teensyMM" // target ID (in code)
#define FLASH_SIZE (0x1000000) // 16MB
#define FLASH_SECTOR_SIZE (0x1000) // 4KB sector size
#define FLASH_WRITE_SIZE (4) // 4-byte/32-bit writes
#define FLASH_RESERVE (4*FLASH_SECTOR_SIZE) // reserve top of flash
#define FLASH_BASE_ADDR (0x60000000) // code starts here
The latest FlasherX version has the correct 16MB value as shown below. This value is meant to represent entire flash, not a maximum buffer size.
...