teensy4 with Makefile built blink example not starting

Status
Not open for further replies.

Dominik

New member
Hi all,

I have a strange problem with my teensy4 (new device, not damaged/used yet):

git clone https://github.com/PaulStoffregen/cores.git
cd cores/teensy4

# comment in Makefile:106
# LIBS = -larm_cortexM7lfsp_math -lm -lstdc++
# I get error: cannot find -larm_cortexM7lfsp_math
# these libs are not needed for the blinker application
# (this is not the problem/question I have)

make NO_ARDUINO=1
../../teensy_loader_cli/teensy_loader_cli --mcu=imxrt1062 -w -v main.hex
-> no blinking


# remove comments from startup.c:56-60 (early init debug LED-on enable)
make NO_ARDUINO=1
../../teensy_loader_cli/teensy_loader_cli --mcu=imxrt1062 -w -v main.hex
-> LED lights up and shortly afterwards the blinking is also working (with correct ON-OFF timing)

# move these uncommented lines from startup.c:
56-60 to after "asm volatile("nop nop nop nop" ::: "memory");
# and leave uncommented (i.e. active)
make NO_ARDUINO=1
../../teensy_loader_cli/teensy_loader_cli --mcu=imxrt1062 -w -v main.hex
-> LED blinks with short pulses (looks like reset loop shortly after the debug LED code)

-> if I place the debug LED code before:
"configure_cache();" line the blinker code seems to be working (i.e. main() is called and working as expected)

The question is:
why does the teensy4 does not reach main() without debug-LED in early stage?

The wiring is easy here: only usb connection nothing else (not even headers soldered yet)

Thanks for any hints,
Dominik
 
Status
Not open for further replies.
Back
Top