Hello All
I have board with MSP430 and OMAP.
The OMAP run Linux with BSLSH utility, that communicate with the MSP430 and burn it.
All I want is to read from an address, without the need to burn the flash of the MSP.
Is it possible ?
The problem is like this:
When I type ./bslsh --bsl --flash msp.hex the MSP is burn with the new software, and I get “>” prompt in the Linux.
I hit dump 8000 and get the correct content in the line
If I hit q and leave the bslsh, and then go back to it by typing ./bslsh –bsl
I get prompt, but when I hit dump 8000 I get FF FF FF FF ….FF which is not the correct values that I burned before.
Why I need to burn the file before I read back the values ?
Also something that I don’t understand:
In 0xC00 there should be address of the BSL, inside the MSP.
So I hit ./bslsh –bsl
Dump c00 and get 0c06
I hit go 0c06 and then dump 8000 and get error:
Serial::transmit(): Frame not valid
Serial::receive(): could not transmit frame. aborting...
could not read
Any hints ?
Thanks a lot
O.Matza
BTW:
Is it possibel that only typing bslsl --bsl, erase the flashes ?
(Cause, after that, the SW on the MSP is not runing anymore, even after power up)
Is this forum active ?
O MatzaIs this forum active ?
_____________________________________Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.
Thanks
It is just that this issue is urgent.
(At least I know that someone read the messages above :-) )
Do you know, by any chance, what is the answer to the questions above ?
O Matza(At least I know that someone read the messages above :-)
However, the BSL is only used by a fraction, and not many people have ever dug into it so deep so that they can offer a solution (I never did).
About your "frame not valid" error, depending on MSp, the BSL area is read protected. Only at its beginning are a few bytes that can be accessed from outside. It's possible that your attempt to read the protected area has lead to an access violation, resetting the MSP. Especially if the funcitont hat does the dumping was uplaoded to the MSP ram to extend the original BSL, so the code that handled your request was not running in the protected area.
Hi O Matza,
basically you are putting the question into the wrong forum. The bslsh is not TI product, and i think it is developed by the community. we do not really offer support for things which are not our official product.
However just to give some comments on your question.
O Matza The problem is like this: When I type ./bslsh --bsl --flash msp.hex the MSP is burn with the new software, and I get “>” prompt in the Linux. I hit dump 8000 and get the correct content in the line If I hit q and leave the bslsh, and then go back to it by typing ./bslsh –bsl I get prompt, but when I hit dump 8000 I get FF FF FF FF ….FF which is not the correct values that I burned before.
What i think could be missing here is that after the first execution, your flash memory is then filled up with the firmware from msp.hex. when you tried the dump/read out the memory for the second time, you need to give first the password which can be retrieved from msp.hex. Referring to ths SLAU319 documentation for ROM-based BSL such the one in MSP430F2274 you are using:
2.4.4.3 RX PasswordThe receive password command is used to unlock the password-protected commands, which perform reading, writing, or segment-erasing memory access. It is not password protected.
Neither start address nor block length information is necessary, because the 32-byte password is always located at addresses FFE0h to FFFFh. Data bytes D1 to D20h hold the password information starting with D1 at address FFE0h.
If the receipt and verification of the password is correct, a positive acknowledge DATA_ACK is sent back by the BSL, and the password-protected commands become unlocked. Otherwise the BSL confirms with a DATA_NAK.
Once the protected commands become unlocked, they remain unlocked until another BSL entry is initiated.
O Matza Also something that I don’t understand: In 0xC00 there should be address of the BSL, inside the MSP. So I hit ./bslsh –bsl Dump c00 and get 0c06 I hit go 0c06 and then dump 8000 and get error: Serial::transmit(): Frame not valid Serial::receive(): could not transmit frame. aborting... could not read
Regarding this issue, could you please tell me what is exactly you are trying to do here? I am not sure whether i understand why you need to access the BSL content.
Regards,
Leo Hendrawan
Hi Leo
Thanks for the answer.
I know that the bslsh is not TI application, but I assumed that since the BSL code, inside the MSP (the code that talks with the bslsh) is TI property, someone will know the answer.
The issue is very simple.
I want to read several bytes, from address 8000 of the flash.
What is the correct command/sequence of commands to do so ??
I have a board with two processors: OMAP and MSP430.
The OMAP connected to the MSP TEST and RESET lines, and runs Linux.
(So if there is another utility to read data from MSP, it should run on OMAP, under LINUX)
The problem is that I can read only if I burn first.
Bslsh --bsl --flash msp.hex and then (when I get prompt) hit dump 8000 is woking
Any other scenario is not working.
I tried also to use the Bslsh --bsl --passwordfile password.hex without success to read after that.
(Serial::transmit(): Frame not valid)
Do you know what should be the structure of the password file ?
(Cause I tried text file, with the content of the 32 bytes in FFE0, without success. I tried binary file with the content of the 32 bytes in FFE0, still without success.
It seems that the password file should be hex file, and can be the msp.hex file itself)
Oren
Hi Oren,
O Matza I know that the bslsh is not TI application, but I assumed that since the BSL code, inside the MSP (the code that talks with the bslsh) is TI property, someone will know the answer.
Yes, the MSP430 BSL itself is TI property, but you are using BSLSH which is open source, and i think the problem is in the BSLSH itself, not the TI MSP430.
O Matza Bslsh --bsl --flash msp.hex and then (when I get prompt) hit dump 8000 is woking Any other scenario is not working.
I still think that after this step, if you start from the beginning again, you need to give the password of the application you downloaded it before.
O Matza I tried also to use the Bslsh --bsl --passwordfile password.hex without success to read after that. (Serial::transmit(): Frame not valid) Do you know what should be the structure of the password file ? (Cause I tried text file, with the content of the 32 bytes in FFE0, without success. I tried binary file with the content of the 32 bytes in FFE0, still without success. It seems that the password file should be hex file, and can be the msp.hex file itself)
Actually i don't because it is basically BSLSH specific, and it is not a TI tool. But looking into the code of BSLSH, it seems it is using a motorola SRECORD format:
-----------------------------------------------------------------------------
int commandPassword(istringstream& is){ string filename; is >> filename; if(!filename.size()) { cerr << "No filename given" << endl; return -1; }
struct stat buf; if(stat(filename.c_str(), &buf) < 0) { perror("could not stat file. file not present in current work directory?"); return 0; }
if(S_ISREG(buf.st_rdev)) { cerr << filename << " is no regular file" << endl; return 0; }
int ret=0;
srecord::memory *mp = new srecord::memory(); if (mp) { srecord::input::pointer ifp (srecord::input_file_intel::create(filename)); if(ifp) { mp->reader(ifp, true); cout << "Using password: "; BYTE pw[32]; for (int i=0; i<32; i++) { pw[i] = mp->get(0xffe0+i); HEX(cout, pw[i], 2) << " "; } cout << endl;
if(!BSL.setPassword(pw)) { cerr << "could not set password" << endl; ret=-1; }
BSL.sendPassword(); }
..............
---------------------------------------------------------------------------
which i guess based on this another open source project: http://srecord.sourceforge.net/
I am afraid i can't help you further from this, again because i think you are having a problem which is not from TI product, but the open source BSLSH itself.
Have you tried to contact the author? In the BSLSH homepage, they give their email address.
Another option that might be help you is we have a cheap solution based on MSP430 Launchpad which can be used to interface MSP430 BSL: http://www.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId=96&tabId=1502&literatureNumber=slaa535a&docCategoryId=1&familyId=1937
In the software package above, you can also get script files which can be used to test MSP430F2274 BSL, which i have tested personally.
Hi
The format of the hex file is Intel record, but the bslsh use a converter inside to convert it to s-record.
Still the password issue wasn't solved.
Also, using another tool is compilcated cause it is board that already designed with OMAP and MSP on it and the OMAP connected to the MSP and communicate with it.
(and the OMAP runs linux, so PC exe utils are not the answer here)
So my question left un-answered and I guess it will stay like this :-(
Hi Matza,
O Matza So my question left un-answered and I guess it will stay like this :-(
Thanks a lot for your answer.
Yes, I sent both developers emails but got no answer.