| Details | Message |
|---|
Read-Only Author Jose Paulo Remor Posted 28-Sep-2007 12:37 GMT Toolset ARM |  Ading a flash table Jose Paulo Remor Hi i want to put a table data at flash (at specific address). How can i save it to the compiled output file? The FLASH.INI file do this? How? Thanks a lot. |
|
Read-Only Author Andy Neil Posted 28-Sep-2007 12:40 GMT Toolset ARM |  RE: Ading a flash table Andy Neil A table is simply an initialised data structure; eg, an array. Is there a reason why it needs to be at a specific address? |
|
Read-Only Author Jose Paulo Remor Posted 28-Sep-2007 12:49 GMT Toolset ARM |  RE: Ading a flash table Jose Paulo Remor Yes, the specific address is important. today im using a flash_write function to write this table, which writes every restart (not good) |
|
Read-Only Author Andy Neil Posted 28-Sep-2007 13:32 GMT Toolset ARM |  RE: the specific address is important Andy Neil "the specific address is important" Would you care to share the reason? |
|
Read-Only Author suvidh k Posted 28-Sep-2007 13:53 GMT Toolset ARM |  RE: the specific address is important suvidh k Use scatter loading file. You can define the RO data/ table in a section and allocate that section to a fixed memory location. For more information see the scatter loading section in realview linker manual. Regards Suvidh |
|
Read-Only Author Jose Paulo Remor Posted 28-Sep-2007 15:37 GMT Toolset ARM |  RE: the specific address is important Jose Paulo Remor Thanks Suvidh its seems a little complex but can solve my problem. another doubt is: If i want to fill the memory with some code like "jump to ###", what is the most easiest way to do this? thanks again! |
|
Read-Only Author Andy Neil Posted 28-Sep-2007 15:50 GMT Toolset ARM |  You still haven't said why the specific address is important Andy Neil "its seems a little complex" Only because of the fixed address - hence the question, why do you (think you) need it at a fixed address? If you explain what you're trying to achieve, somebody may be able to suggest a less complex way of doing it... "If i want to fill the memory with some code like 'jump to ###', what is the most easiest way to do this?" How about a table of function pointers? (although, of course, that would be calls rather than jumps) Again, if you explain what you're trying to achieve, somebody may be able to suggest a simpler and/or more appropriate way of doing it... |
|
Read-Only Author Jose Paulo Remor Posted 1-Oct-2007 11:51 GMT Toolset ARM |  RE: You still haven't said why the specific address is important Jose Paulo Remor andy, try this to understand what i need... http://www.keil.com/support/man/docs/armlink/armlink_chdhbhfi.htm |
|
Read-Only Author Andy Neil Posted 1-Oct-2007 12:19 GMT Toolset ARM |  That has nothing to do with explaining your requirement! Andy Neil "try this to understand what i need" That doesn't say anything about why you think that you need to fix this table at an absolute address. Of course, you may well have very good reasons; but if it isn't really necessary to your application, then you can make your life a whole lot easier by removing the unnecessary restriction! So, again, if you say what you're actually trying to achieve then people may be able to suggest alternative ways to do it without having to resort to fixed, absolute addresses - thus saving you all this grief with scatter loading, etc! |
|
Read-Only Author Jose Paulo Remor Posted 1-Oct-2007 12:35 GMT Toolset ARM |  RE: That has nothing to do with explaining your requirement! Jose Paulo Remor Of course, you may well have very good reasons; but if it isn't really necessary to your application, then you can make your life a whole lot easier by removing the unnecessary restriction! Anybody said to you that my life is not easy because of a fixed address?? Maybe this restriction is unnecessary to you... think about it. So, again, if you say what you're actually trying to achieve then people may be able to suggest alternative ways to do it without having to resort to fixed, absolute addresses - thus saving you all this grief with scatter loading, etc! Mr. Sudivh already helped me with the answers that i was looking for. If i want some alternative to what i want to do, ill post a thread with this title: "Help, i need a alternative to do..." |
|
Read-Only Author Per Westermark Posted 1-Oct-2007 17:38 GMT Toolset ARM |  RE: That has nothing to do with explaining your requirement! Per Westermark 90% of the users who get into troubles with absolute addresses, jump tables etc are trying to solve the wrong problem. How do we know that you are not among those 90%? That is a reason why a well defined question normally mentions the reason behind the problem. Even if you think your indended solution is the best, you might be wrong. |
|
Read-Only Author Andy Neil Posted 1-Oct-2007 18:13 GMT Toolset ARM |  Suit yourself Andy Neil "Anybody said to you that my life is not easy because of a fixed address??" Yes: you did! On 28-Sep-2007 at 07:37 you yourself said, "its seems a little complex" As I said at the time, it is the fixed address that makes it "complex" - it would be a lot simpler it it weren't for the fixed address! But, if you're happy with a "complex" solution where a simple one may well be sufficient - then, of course, you don't need any more suggestions! "If you see every problem as a nail, then you will always propose a hammer as the solution" Or, as Hans-Bernhard Broeker once said, "This ... only proves that if you absolutely insist, you can drive a 10-inch nail into concrete using a fine-tip soldering iron, even if you have a perfectly usable hammer at hand. It spectacularly fails to answer the actual question, though: why the heck would anyone want to do such a thing?" http://www.keil.com/forum/docs/thread10430.asp |
|
Read-Only Author suvidh k Posted 28-Sep-2007 17:19 GMT Toolset ARM |  RE: the specific address is important suvidh k Hi If you are to do in assembly - You can use
LDR PC,abcd_addr
abcd_addr is your jump address. You can hava a section x and define a series of this instruction. Place that section at whatever fixed address you want. This is how I load the Interrupt vector table . Regards suvidh |
|
Read-Only Author Jose Paulo Remor Posted 1-Oct-2007 11:48 GMT Toolset ARM |  RE: the specific address is important Jose Paulo Remor thanks again suvidh. can you send your example of scatter loading file? there is no examples in keil manual at home page. |
|
Read-Only Author suvidh k Posted 1-Oct-2007 20:10 GMT Toolset ARM |  RE: the specific address is important suvidh k You can get more idea about how to do this from this article. http://www.keil.com/support/docs/3237.htm Regards Suvidh |
|