cancel
Showing results for 
Search instead for 
Did you mean: 

field firmware update & serial Port

twinknight
Associate II
Posted on January 26, 2006 at 09:21

field firmware update & serial Port

22 REPLIES 22
lgiordano2
Associate II
Posted on January 18, 2006 at 17:54

Hi,

Are you sure the code posted has not the 56k limitation?

I saw few differences in source code with previous version.

I am trying to make it work with CrossStudio, but I am having trouble with my app remaping. Do you have any source example?

Regards,

Leo

twinknight
Associate II
Posted on January 19, 2006 at 01:33

STR711/2 development too hard.

- No On-chip boot loader, use Jtag (High price) first.

- I/O pin Not TTL 5V tolerant

Thanks

Bye bye

[ This message was edited by: kmaster on 19-01-2006 06:04 ]

anis2
Associate II
Posted on January 19, 2006 at 04:38

Yes, I'm sure, the code posted has not 56K limitation. I tried it and it works fine 8-)

In fact, the major modifications was in the protocol to download the code image from hyperterminal (Ymodem.c files).

========================================================================

I am trying to make it work with CrossStudio, but I am having trouble with my app remaping. Do you have any source example?

========================================================================

Do you mean by this source example that you need a CrossStudio project?

If yes, I can send you the binary file of the application.

Regards.

lgiordano2
Associate II
Posted on January 19, 2006 at 08:14

Hi,

I could compile your source code, although I had some trouble with some functions or defines names, which are different in my ST library. For instance, the flash.c/flash.h has some differences with the one on the library.

I am very new to ARM programming. Correct me if a I am wrong, but the IAP is written on Sector 0, bank0. So my application has to be located on Sector 0, bank1 or more. Besides, the RAM has to be remaped. So I have 2 problems:

1) Understand all the remaping (RAM and Flash)

2) Doing it with CrossStudio

As one friend says, it is easier trying than thinking.

Regards,

Leo

anis2
Associate II
Posted on January 19, 2006 at 12:57

Hi,

Yes, the IAP should be located in bank 0 sector 0, but your code should be located in bank 0 sector 1 not bank 1 sector 0. Because in the 71x_init.s there is a jump to this address.

Concerning the CrossStudio, the code i sent is a C standard, so only the two file 71x_init.s and 71x_vect.s should be ported to the CrossStudio toolset.

Regards.

lgiordano2
Associate II
Posted on January 19, 2006 at 15:40

Hi,

I am developping my own bootloader. The ''Flash Programming Reference Manual'' says that write operations must be executed from another bank or another memory. So, at this moment I am making my bootloader code to be on Bank1 (which is Flash Data memory) and main() and other stuff is on Bank 0, sector0. In this way I can write to all Bank0.

Then I will try to copy the flash writing routines to RAM and execute them form there. Is all this right?

By the way, the Flash data memory, is usable for code? The only difference I see is the 100kcycles endurance.

Regards,

anis2
Associate II
Posted on January 20, 2006 at 05:41

Hi,

Yes you can use the bank 1 for code but you have to know that you can not boot from this bank. So, if your bootloader is located in bank 1, you have to jump to it from bank 0. To do it there is two cases:

1) Use sector 0 to jump to the boatloader. In this case your program should be loaded from sector 1 of bank 0.

2) The program to be loaded with your bootloader should takes into account the fact that it can jump to the bootloader. In this case if this program plants, you can not access boatloader!

==> So the first solution is better and more robust than second one.

Concerning the execution of the Flash routine from RAM, you are right.

Regards.

lgiordano2
Associate II
Posted on January 20, 2006 at 16:39

Hi,

sorry for asking so much, but you are a great help when I am stucked. I hope this thread can help anyone else.

Well, this is what I am doing:

My bootloader main() is in Bank 0, sector 0. As I am using ST Library, I just placed the flash.c module in a different section, which is in Bank1, so the writting routines to Bank 0 can be done from there. This is all for debuging puposes so I can see the location of each routine. I will then place the flash module in RAM and call it from there. I am sending the code to the bootloader in HEX format,

so I check it and make sure it doesn't overwrite bootloader code.

This is my problem:

Bootloader project has its own StartUp file, and at this moment it doesnt use interrupts, but lets supose it does.

The application that will be uploaded will also have its own StartUp file and uses interrupts. How do I make all the remaping? I mean, when device starts, it executes bootloader. If no event is received, it jumps to user code at 0x40004000 (sector 2, I reserved 2 sectors for bootloader). Then, user code will do its initialization code, which needs interrupts. This means I have to place code on sector 0 (but I cant!)?

Thanks for your help (and time)

Best regards,

Leo

lgiordano2
Associate II
Posted on January 23, 2006 at 07:16

Hi RISC,

I had seen that thread. I am now trying to make it work in CrossStudio. Thanks for your reply.

Regards,

lgiordano2
Associate II
Posted on January 23, 2006 at 07:54

Hi,

I am having trouble to make it work with CrossStudio. Have you ported the source code posted in the ''Remapping of RAM'' thread to CrossStudio?

Regards,