Dangerous Prototypes

Other projects => Past projects => USB serial LCD backpack => Topic started by: jeanmarc78 on March 17, 2013, 11:15:26 pm

Title: [Fixed] Bootloader dont load firmware above 0x5FFF
Post by: jeanmarc78 on March 17, 2013, 11:15:26 pm
Hello,

I wanted to load in the LCD backpack a firmware which goes behond 0x5fff. Then it appears that nothing is written between 0x6000 and the end of the program memory (0x7fff).
No error is reported on the PC side.

The indicator in eeprom is still present => shows that an error has occured.

Is this problem already known with the bootloader ?

Best regards
  JM
Title: [Fixed] Bootloader dont load firmware above 0x5FFF
Post by: jeanmarc78 on March 23, 2013, 05:04:01 pm
Hello,

In fact the problem is not in the Diolan bootloader but in the fw_update program on the PC side.

It was built for pic18f24xx or 18f44xx which have less flash memory.

Then, i have then decided to recompile the fw_update program in Windows XP environement.

It has been quite difficult as i have found no explanation ...

In the fw_update directory, there are many files that look like linux ones. Then i have had a first try with mingw without success.

Thanks to a file with a vcproj extension, i have decided to try with visual C++ compiler.
The Microsoft Visual C++ express 2010 package can be downloaded for free from Microsoft site.

When i try to open the fw_update.vcprog project, i have been proposed to convert it in the 2010 format.
This has worked quite well.
When trying to compile, i have got an error for a missing include file (hidspi.h) supposed to be in the c:WINDDK directory.

After googling i have found this directory is associated with the Microsoft driver SDK.
On Microsoft site i finaly found this SDK (release 7.1) for free.
Quite long download as we must get a whole CD image (.iso).
Then i have installed this SDK and found that many changes in the directory tree have been made since the fw_update has been done.
After localizing the 3 needed files, i have updated the relevant lines in the pic_bootloader.cpp file.

Then i also changed the "BOOT_FLASH_SIZE" to 0x8000 to allow full access to the 32k bytes of Flash of the PIC18F2550.

New attempt to compile and new problem ... in file fw_update.rc

As the fw_update program is CLI only, i decided to remove it from the project and fortunately the compilation has been OK.

A few tests and that looks ok, i can load a large firmware in the 18f2550

Attached is the new "fw_update_32k.exe" file. I have added the 32k in its name to avoid confusion with the fw_update.exe.
Normally, it should also works correctly with smaller flash 18F pic's.

[attachment=0]
It can also be used with other DP projects which use the Diolan Bootloader such as the Flash Destroyer, USB infrared toy, logic shrimp ...

Best Regards
  JM

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00942054944session_write_close ( )...(null):0
20.00972186536ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00972187312Database_MySQL->query( ).../DatabaseHandler.php:119
40.05472326048Database_MySQL->error( ).../Db-mysql.class.php:273