hello everybody
I have a question about how to flash the netx serial flash. I already flashed the serial spi flash using bootwizard/usb. this works great.
My question now: is it possible to automate this procedure? For example unsing the bootwizard as a commandline tool, so that I can start the flashing procedure from another application? How do I get a feedback if flashing was successfull or not?
thanks for your help!
pi
hi Chris
thank you for your detailed information! the delay is no problem, I don't need it at the moment, my question was just to be sure that it's possible for future use.
it would be great to have more than just the sys-led feedback, sometime :)
pi
hello
any news on this topic? is there already an other feedback available than just the green led? is now sometime? :wink:
greetings pi
any news on this topic? is there already an other feedback available than just the green led? is now sometime?
Yes, 'sometime' is getting closer. Here are some of the most interesting changes:
(Edit: file removed, please use the updated version below)
And please give some feedback... :)
[/]hi chris
thanks for the fast reply!
But I can not select the netX to download! It says "old netX ABoot on USB" on Port "bus-0, \\.\libusb0-0000-0x0cc4-0x0815", comment "netX with old bootloader"... Test and OK buttons are disabled...
Any Ideas?
Thanks!
But I can not select the netX to download! It says "old netX ABoot on USB" on Port "bus-0, \\.\libusb0-0000-0x0cc4-0x0815", comment "netX with old bootloader"... Test and OK buttons are disabled...
Ah, sorry! I forgot one tiny detail: the new bootwizard needs a new version of the netX bootcode. Future chips like the netX50 will have it in rom, but for the current version of the chip the new romcode must be emulated.
Just double click the aboot device (or select the aboot device and click "emulate"). The new bootcode is started and the old ABoot device will be replaced by a shiny virtual com port. For the first 'emulation' Windows will request a driver. Use the netX_bootmonitor.inf in the folder 'driver/win/usb_cdc' and press 'Rescan' in the dialog after install. A new Com port will appear in the list. Doubleclick the entry to identify it as a "HBoot" device and use it with another doubleclick.
hmm, strange. I doubleclick the mentioned entry, and the entry disapears. But there is no new comport available after doing that.
Pressing Rescan does not help... Also inside the Device-Manager is no new COM-Port visible. But the old Bootdevice is still there. What am I doing wrong? Could it be a problem because I already installed the usbser.sys some time ago?
ok, problem found! after deinstalling all previous drivers, I got a new COM - Port!
Thanks! You will hear again from me!
now it worked, got a COM-Port, and after pressing OK-Button, it started erasing and flashing.
But during the flash-prozedure it stoped twice at step 386/494 and once at step 76/494. the task-manager tells me that bootwizard is using 99% of the CPU - Time... I was waiting, but only shutting down the bootwizard helped...
What bootwizard logged:
data size: 0x0003FA88
flash size: 0x00420000
ok, data fits in flash
Erase flash...
erase done
Write data...
pressing cancel only disabled the cancel button...
is it possible to attach a picture or other files to the posts? So I could show you my screen...
But during the flash-prozedure it stoped twice at step 386/494 and once at step 76/494. the task-manager tells me that bootwizard is using 99% of the CPU - Time... I was waiting, but only shutting down the bootwizard helped...
Hm, that's not good. The bootwizard should never eat up that much, it's just waiting for data from the serial port in this state. Couldn't you flash at all or were this 2 errors out of X tries?
is it possible to attach a picture or other files to the posts? So I could show you my screen...
Sorry, that's not possible. But you can post links to other image ressources or urls.
Couldn't you flash at all or were this 2 errors out of X tries?
I'm sorry, but could not flash at all (ok, I tried only 3-times...) I will make further tries, I think tomorrow I should have time...
Is it nomore possible to start flashing over a batch-file?
hi chris
sorry for my late reply, did not have time to test it earlier...
now I tested about 10-times, and twice with success. 8-times without success, then downloading worked well but it always stopped during the flashing procedure. It did not stop at the same step, when it stopped varied.
hope I could help you.
greez, pi.
now I tested about 10-times, and twice with success. 8-times without success, then downloading worked well but it always stopped during the flashing procedure. It did not stop at the same step, when it stopped varied.
Whoa, 8 of 10 are a bit too much failures. Are you using a normal COM port (like 8250) or is this some USB adapter? We also tried to make the communication routines a bit more robust, but until I can reproduce this I'm a bit lost. Please try this new version:
http://board.hilscher.com/userimages/development_tools/bootwizard_0.9.1_svn1160.zip
Btw. Please be patient with your next bugreports, I'll be out of office for the next 3 weeks. :-)
Pi wrote:now I tested about 10-times, and twice with success. 8-times without success, then downloading worked well but it always stopped during the flashing procedure. It did not stop at the same step, when it stopped varied.Whoa, 8 of 10 are a bit too much failures. Are you using a normal COM port (like 8250) or is this some USB adapter? We also tried to make the communication routines a bit more robust, but until I can reproduce this I'm a bit lost. Please try this new version:
http://board.hilscher.com/userimages/development_tools/bootwizard_0.9.1_svn1160.zip
Btw. Please be patient with your next bugreports, I'll be out of office for the next 3 weeks. :-)
I'm using the usb - Port of the netX.
I also got not time to test it, I'm also out of office, but only for one week ;-) so I wish you nice holidays, if thats the reason why you're out of office!
Hi Chris.
Iam interested in download a image file with the netxusbmon command line tool.
I have tested to download the image file with the flash.txt:
netxusbmon
I have an NXSB 100 Board.
What i must change in the flash.txt file to download to an
NXDB500 SYS Board.
When i use the bootwizard, so it woks fine !
Can you help me :!:
I want write a own application to download image files.
Hello Rainer
I can't tell you what you has to be inside the flash.txt, but I "wrote" myself an application which flashs the netX, and it's a simple exe file which has everything inside, this you can send to your customer for example. All he has to do before he can flash, he has to install the USB driver for the netX Bootmonitor.
I used 7-zip, which is able to pack all the needed files into an exe. When starting this exe it askes if you want to flash the new firmware and then starts the download of the new firmware. If success, the green LED is lightning.
How it is done:
Download 7-zip from the net, and install it. Search on the Internet for the file 7z.sfx and copy it into the folder where you installed 7-zip.
Create an text file named config.txt with this:
;!@Install@!UTF-8!
Title="Firmware upgrade"
BeginPrompt="Please set netX into Boot Mode and connect over USB, then select YES to flash new Firmware."
RunProgram="download.bat"
;!@InstallEnd@!
Make a compressed files.z (7-Zip Container) including all the needed files, for example:
download.bat (one line: netxusbmon
flasher.bin
libusb0.dll (USB driver)
libusb0.sys (USB driver)
netx_bootmonitor.cat
netx_bootmonitor.inf
netxusbmon.exe (I'm using V0.8.1)
YourFirmware.bin
then start the following command:
copy /b c:\Programme\7-Zip\7zS.sfx + config.txt + files.7z Flash.exe
What you receive is an flash.exe which asks you to flash the software.
Hope I could help you, or anybody else :-)
Regards, Pi
Hello PI.
I want to test your configuartion, but i dont have the file 7ZS.sfx.
I have download the 7-ZIP Install.exe und Install the program.
I found no 7ZS.sfx file in the 7-ZIP folder :!:
I have download the 7Z457 and 7Z481B.
Can you help me please :?:
Hello Rainer
You got to download that file 7z.sfx seperately. I do not remember where I got it from, I googled for it when I remember correct. But just give me your email, I'll send it to you.
Regards, Pi.
Hello PI,
I have found the 7Zs.sfx file.
I have tested it. The Flash.exe makes a download, but in the NETX is the old Firmware.
I have a NXDB500 SYS Board.
My Flash.txt file:
!e init sdram controller
fill 100144 03C13261 // configuration of SD_2xk4s561632C get it from
fill 100140 030D0121 // sdram_config Hiscript file
!l flasher.bin 8000 //
!l evalp1.bin 80000000 // What does this means ? What is the address
// 80000000
!e starting flash application
!c 8000
can you help me :?:
hi Rainer
evalp1.bin is your firmware which you want to download to the flash. here you got to write the name of your *.bin file, which you also included into the compressed container. Do you know how you get to this file? Because from the linker, you will only get the *.elf file...
And the 800000000 is the adress to write it to? If I'm right, this is the adress of the external ram. There the firmware is written to, and the flasher.bin then is writing it into the flash. I'm not shure about that, please correct me if I'm wrong...
Regards, Pi
Hello PI,
The evalp1.bin is my project file as image wich i have generated with the bootwizard.
When i download the file with the bootwizard, then it works correct.
Anything must be missing :!:
hmm, this is strange.
check that you got the actual *.bin file inside your 7-zip container. when you start the flash.exe, then you see the dialog which askes you to connect. Then you should see a popup cmd window. Inside this window, there it starts writing points "............". First for the flash.bin, then for your firmware.bin. Is this what your app is doing too?
regards, pi
Hi PI,
Yes. It says at last :
]OK
]Echo: starting flash application
The sys LED turns to green after a few seconds.
Wich board do you have :?: .
How you generate the image file :?:
I'm using our own hardware, but basically this should make no difference, because our hardware is basically compatible to the NXSB100. The bin file I'm generating like that:
I copy the firmware.elf into the folder of bootwizard_0.8.1, then I run the following command:
bootblocker -bootimage -s SPI_NXSB100 -d SD_MT48LC2M32B2 -t HITEX_ARM_WIN_4_00 -o firmware.bin firmware.elf
do you also use bootwizard version 0.8.1?
pi.
:lol: :lol:
Hi PI,
I found the error :!:
It is the flasher.bin file from the new bootwizard V0.9xx This file is 30kB great that from V0.8xx is 13KB great.
When i use the flasher from V0.8xx than it works :!: Also with the netxusbmon from V0.9xx
To build a image with bootblocker.exe i must take it from V0.9xx, because from V0.8xxx following error ocours: src device not found.
When i call the procedure bootblocker -listsrc the follwing device SPI_NXSB100 is missing :!:
Where the bootblocker .listsrc command get the list of devices :?:
Great! Good to hear that it's working now :D
HI PI,
You write that you have an own hardware board :!:
Gives there information about your board :?:
Hi ,
here you can see our Device:
http://www.schweizer-electronic.ch/datatransmission/haupt-nv2280-spr2.htm
Regards, pi
Hi,
I want to flash my binary in a parallel flash on sram bus [SRAM Bus Pflash Intel TE28F128J3].
I have generated the binary with Bootwizard V1.0398. The name of the binary is "V105".
Now i want to flash the binary with netxusbmon
The flash.txt file is filled with:
!e init sdram controller fill 100144 03C23251 fill 100140 030D0111 !l flasher.bin 8000 !l V105.bin 80000000 !e starting flash application !e waiting for green sys led !c 8000
The SDRAM parameter are the right one.
After starting the procedure its shows me "Can´t stat file V105.bin". The binary has a size of 890 KB.
Why the flasher can´t flash the file ?
Br,
Rainer
Hi Rainer,
The flasher.bin is from the Bootwizard [flasher.bin 21.08.2008]
Please do not mix the old description in this thread and the new flasher binary. This will not work!
The description is based on the old flasher binary (pre 0.9.2). This one only needed a pointer to your data and burned it into the flash.
You are trying to use the new flasher binary which has a lot of new features. It needs some more config options. The new flasher also sends some messages to the PC (as you can see in the Bootwizard's log window). It uses 4 vectors for the communication. If the flasher runs as a standalone application, you have to init them.
I will post an updated howto for all this in... uh... like the near future. :-D
Until then I recommend to use the pre 0.9.2 flasher.bin .
After starting the procedure its shows me "Can´t stat file V105.bin".
This seems to be another problem. Is the V105.bin file in the same folder as netxusbmon and flash.txt? Please add a path if it is somewhere else. Is the file accessible? Try to open it with something like a hexeditor.
Hi Chris,
Thank you for the answer. I will wait for your post.
Br,
Rainer
Chris Frickel
Hilscher
Hi Pi,
First a big sorry for the long delay! It is possible to build and flash a bootimage from commandline, but not with the bootwizard.exe . This is a gui only application. There are 2 other tools in the bootwizard zip file: bootblocker and netxusbmon
The bootblocker is used to build a bootable image from an elf file. The 'doc/bootblocker.html' file contains some documentation on this. The netxusbmon transfers the flasher and the image to the board.
Here is a step by step description how to build a bootimage from the file 'project.elf' for the SDRam on the NXSB100 Starterboard.
1) Download the latest Bootwizard version from our Files section. Unpack the archive in one directory and copy your elf file there.
The directory should look somehow like this:
2) Build the bootable image 'project_nxsb100.bin' with this command:
The source (-s) and destination (-d) parameters are just a short form of the options in the bootwizard dialog. You can get the mapping of the long device names to the short ones with these commands:
3) Create a file with the following content. I named it 'flash.txt'.
The first line echos the message "init sdram controller". The next 2 lines configure the SDRam controller for the MT48LC2M32B2 chip.
The first "!l" command loads the flasher binary to the internal ram, the next line loads the bootable image to the SDRam. After another message the flasher is executed with the "!c" command.
Put your starterboard into boot mode:
Execute the script with the following command: