Regarding .LCF

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Regarding .LCF

跳至解决方案
1,480 次查看
freakyfreak
Contributor II

Hello there,


I recently created another thread but that thread was to general. Thus I'm creating a new one with a more "centralized" question.

 

When your project is being built, the file generated contains all the parts that can be found in MEMORY (in LCF file). For instance resetvector, init, exception_handlers, internal_flash and so on. Correct me if I'm wrong here.

Is this generated file a .s19 format?

 

The internal_flash contains my program code (main and other functions). I assume?

 

Ok, so if I want to program the flash with a new set of code I will have to erase all parts mentioned before in the flashmemory and then write the new code, starting from the first address which is resetvector. It's not just enough to erase the main program code, right?

 

 

Thanks!

 

Ps. I'm not really sure where I should post this subject..

标签 (1)
标记 (4)
1 解答
1,344 次查看
TomE
Specialist II

Which chip?

Which IDE? What's generating those files?

If you're using CodeWarrior then it might be better to post in the forums specific to CW (which I've never used).

This forum is pretty low traffic now.

Some general answers:

> Is this generated file a .s19 format?

Open it in a text editor. If it is readable text and looks like the following then it is S19:

http://en.wikipedia.org/wiki/SREC_%28file_format%29#16-bit_memory_address

Since the Flash is usually divided up into pages, and since you have to erase an entire page at a time, you would normally erase everything (all pages) and then reprogram it.

If you're trying to update a unit "in the field" where it is reprogramming itself, then that gets tricky. You can't have the cpu run in the flash that it is erasing/programming. It has to run in RAM. You're probably not doing that yet, but you will...

Tom

在原帖中查看解决方案

2 回复数
1,344 次查看
freakyfreak
Contributor II

Thank you Tom,

I believe I'm past these questions right now. Were so many questions popping up at my head at that moment. But now I've managed to create a project where the bootloader is run in RAM :smileyhappy:

0 项奖励
回复
1,345 次查看
TomE
Specialist II

Which chip?

Which IDE? What's generating those files?

If you're using CodeWarrior then it might be better to post in the forums specific to CW (which I've never used).

This forum is pretty low traffic now.

Some general answers:

> Is this generated file a .s19 format?

Open it in a text editor. If it is readable text and looks like the following then it is S19:

http://en.wikipedia.org/wiki/SREC_%28file_format%29#16-bit_memory_address

Since the Flash is usually divided up into pages, and since you have to erase an entire page at a time, you would normally erase everything (all pages) and then reprogram it.

If you're trying to update a unit "in the field" where it is reprogramming itself, then that gets tricky. You can't have the cpu run in the flash that it is erasing/programming. It has to run in RAM. You're probably not doing that yet, but you will...

Tom