
Originally Posted by
PaulStoffregen
Here is an attempt to fix the bug where upload sometimes fails (if the pushbutton is pressed again) resulting in both LEDs blinking for several seconds.
Extract this to {Arduino}/hardware/tools, replacing the copy already installed.
Updated code in use. Not sure how to 'prove the negative' - not sure if anything printed in loader/Verbose? {as Mike wondered}
IIRC I saw 'DUAL LED blink' four times in some hundred+(?) builds - assuming they all caught my eye.
Figured out why Code4Code - Bench mark version - moved to RAM was failing ... tried using DMAMEM with init strings that of course don't work.
Funny: It points out local vars can't be in DMAMEM - but not that DMAMEM can't be initialized
C:\T_Drive\tCode\T4Encrypt\Code4CodeRAM\CodeMade.i no:22501:25: warning: 'used' attribute ignored [-Wattributes]
C:\T_Drive\tCode\T4Encrypt\Code4CodeRAM\CodeMade.i no:22502:25: error: section attribute cannot be specified for local variables
So some dozen builds and gratuitous Button uploads and not seen anything yet.
Had to downsize to a mere 1400 cascading functions to fit RAM and have enough stack space to not trigger a Crash:
Code:
teensy_size: Memory Usage on Teensy 4.0:
teensy_size: FLASH: code:370096, data:121592, headers:9044 free for files:1530884
teensy_size: RAM1: variables:45952, code:365656, padding:27560 free for local variables:85120
teensy_size: RAM2: variables:24736 free for malloc/new:499552
Powered 2nd T4 Beta and button pushing code to it ... not sure what sequence triggered the LED Show before ...