OpenSourceEBike / TSDZ2-Smart-EBike

Flexible OpenSource firmware for TongSheng TSDZ2 mid drive ebike motor
GNU General Public License v3.0
251 stars 130 forks source link

lots of "address out of range" errors when flashing lcd firmware #121

Closed glauco76 closed 4 years ago

glauco76 commented 4 years ago

Hi all

I am trying to flash the 0.20 beta, but I am constantly getting a lot of "address out of range" errors when loading the LCD hex file into the ST visual programmer (on Windows).

Usually these errors pop up when the wrong microcontroller family is selected, but here it happens always, both with the STM8S105X6 and X4 type.

The 0.20 motor firmware hex file instead loads just fine with the X6 micro type. Is there anything wrong I am doing?

glauco76 commented 4 years ago

Just to be clear, the hex file seems to be larger than the available memory area. Address out of range errors start at 0x107E1 and end at EOF. This is indeed outside the program flash memory range of the STM8S105X6 microcontroller (based on its datasheet), which goes from 0x08000 to 0x0FFFF. The last line loaded is at address 0X0FFF0... Maybe a build issue? I don't have a linux build system at hand to verify...

glauco76 commented 4 years ago

sorry for self-threading... it has definitely something to do with the build. I just cloned the repo and built the project on windows and the hex file for the LCD is a lot smaller.

Nothing to do with the code, I'll close the issue