Product DCD 0 ;0 EXPORT Product FirmwareVer DCD 0x00000001 Version, cc = Major Version EXPORT FirmwareVer
After removing above lines from my startup file(filename.s), my application doesn't even make it to main() or __main(). When I undo this change, I am running.
Please advise!
Why do you want to remove it?. some in the startup is pretty clear, some is 'secret sauce' required for the compiled code to run.
Erik
Those lines consume memory. When you remove them, other stuff will change its position.
You have 2 options:
1. Find what is the critical thing that's moving, and adjust accordingly;
2. Leave the lines (or equivalent) in!
You haven't given any information to allow anyone to help you with option 1.
>> Find what is the critical thing that's moving, and adjust accordingly
Product ID and Firmware Version are defined in this file and refrenced in another file. We don't need to hardcode these Two identifiers in this file because they will be fetched from another controller over modbus. Therefore, I would like to completely remove them from this file. They don't belong to this file anymore.
>> When you remove them, other stuff will change its position.
Could someone refer me to a source that explains this in detail ?
Thank you!
So you could just put dummies in their place.
It's not rocket science!
Unless you specifically specify otherwise, memory is allocated in order - so, if you remove some stuff, then the stuff that remains will obviously get allocated at lower addresses.
You should be able to see this in the Map file...
Perhaps someone within your organization can explain the purpose and impact of these structures/values. The random data supplied so far isn't going to be enough for third parties to figure out what's going on here.
You should also be able to turn off "run to main" and trace through your code and better understand it and it's behaviour.
"Those lines consume memory."
Even better: if you delete all the start-up code and your own code, no memory will be consumed!
>> Perhaps someone within your organization can explain the purpose and impact of these structures/values.
I know exactly what these lines of code mean. They are defined in this file and externed in C++ file. We don't need these two variables anymore because our architecture has changed.
I'm asking how I can rewrite assembly language .s file with these definitions removed so everything is in correct position ?
Do you honestly believe you've provided enough information for anyone not familiar with this particular file, and the lines surrounding the four you've shared, to understand why they are critical?
I know exactly what these lines of code mean.
Who do you think you're kidding? The very fact that you asked the question you did proves beyond any reasonable doubt that you do not know the meaning of those lines, and certainly not "exactly".
"I'm asking how I can rewrite assembly language .s file with these definitions removed so everything is in correct position?"
And that very question was answered (above) on 30-Sep-2013 at 18:41 GMT!
Understanding what these two lines do, and understanding the result of removing them, aren't the same thing.
Have you started any investigation yet, to figure out why your program fails when you remove them?
... to figure out why your program fails when you remove them?
Which would be (part of) Option 1 given in the answer (above) on 30-Sep-2013 at 18:41 GMT!
"I know exactly what these lines of code mean."
Well, maybe you can explain to yourself exactly what these lines of code mean so you can rewrite them.