EloquentTinyML icon indicating copy to clipboard operation
EloquentTinyML copied to clipboard

Fail: "cannot move location counter backwards"

Open iludis21 opened this issue 3 years ago • 5 comments

Hello Simone, I used your script to create TinyML models, which should recognize 96x96 grayscale images. In Python everything worked as well, model was created. Only compiling for Nano33 BLE in Arduino does not work. It breaks with the error message "linker_script.ld:138 cannot move location counter backwards (from 20fd4a70 to 2003fc00)". Could you maybe help me further? I get the same error message when I try to compile the exported model from Teachable Machine to Nano 33 BLE.

iludis21 avatar Nov 01 '21 19:11 iludis21

Hi never encountered this error. Please share your Arduino sketch and possibly your Python script.

eloquentarduino avatar Nov 01 '21 19:11 eloquentarduino

problem_011121.zip Here it is. Thanks in advance.

iludis21 avatar Nov 01 '21 20:11 iludis21

test1_0311.zip Hello Simone, the problem has been solved. It was beginner's mistake - model was badly made and way too big (28MB). Fixed and optimized to 1,3MB - now it works. But I have another problem: the input data are int values between 0 and 255, but as output I want to have two float values. But your predict function predict(input, output) supports either int/int or float/float. Can you give me a hint here?

iludis21 avatar Nov 03 '21 17:11 iludis21

I will fix the library on this. For now, declare your input as float so you can use the float/float version of predict.

eloquentarduino avatar Nov 03 '21 17:11 eloquentarduino

Thank you.

iludis21 avatar Nov 03 '21 17:11 iludis21