We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
My problem is as following. I have a string array, If I delete last string of GprsErrors or pointer of GprsErrors, if I make const pointer. I don't get error.
I'm using some static addresses(0x20000309, 0x20000308 .....), I guess, Keil is trying to write static address so I get the following error.
Keil shows as fgetc_b.o and constant.o overlap, I didn't find the source of the problem.
what is my fault? or How can I find and solve the problem?
Thanks alot.
Kutay,
..\Output\Project.axf: Error: L6971E: fgetc_b.o(.data) type RW incompatible with constants.o(.ARM.__AT_0x20000309) type ZI in er RW_IRAM1.
char const * GprsErrors[]={ "BAUDRATE", "AT CMD", "ATE0 CMD", "BAT INIT", "PIN CODE", ..... ".....", // I'm deleting this string and I get no error(everything is ok) };
Dear Per Westermark, thanks a lot for your valuable comments.
You're right. I'm also agree. I don't want to use static addresses and I haven't used them before but now I have to use because I have been working for three months for new company.
So all of older devices(by older embedded engineers) had designed at fixed addresses and new devices should support older devices. There are 250K older devices.
What can I do? As an engineer, I'm trying to find a solution.
And there is an interesting case.I usually level 3 optimization for my projects. Older engineers hadn't used any optimization (namely optimization level 0). while optimization level 1, devices don't work. :)
I think I have to work a lot
Note that you can use a scatter file, allowing you to create custom groups for variables from different modules. Then you can make sure that the linker finds a solution where it doesn't overlap variables with the absolutely positioned variables.
With no custom configuration, the linker will think it's ok to use all the RAM - and then you or the linker will be unhappy when you add enough variables that you get overlapping.
Another thing to consider is that the profit/value of the company depends on the quality of the code. So it might be a reason to try to ask for some time allocated to code architecture work - but it requires that the company management must be convinced that it represents a profitable investment.
Most code bases requires a not too insignificant percent of the time on rework to better adapt the code to slowly changing requirements or to take advantage of new knowledge or tool improvements. It just isn't competitive to design the same way today as 10 years ago.
Carve out a region for the static stuff in the scatter file, say 0x20000000..0x200003FF, and put your new stuff elsewhere.
You'd have to look at how exactly the other data is accessed via address from outside. If it is through an interface you provide, then couldn't you just decode that appropriately?
Here we use a more considered command/response system to access internal parameters, not absolute addresses within our firmware or RAM footprint.
I have decoded, access via fixed address from outside by RF or gprs.
I will try to solve by scatter file,
Thanks a lot
But your processor is unlikely to have dual-port memory. So it's unlikely that some outside hardware can use a direct pointer to access the memory.
So exactly how is that outside access performed?