This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can I pass parameters to my project?

Hi,

I have a small project which carries out memory testing when loaded into my target hardware (C165 Based).

At the moment, I have to hard-code the
address at which the memory test starts testing and the range of memory to be tested.

This involves re-building each time I wish to execute the test on a different area of memory, or different device.

A colleague is creating a custom 'monitor' which will 'locate' the test code in a designated area and run it, however we would like to know how we could pass the above parameters (start address, range) to the test code, thus avoiding rebuilding the code each time.

I think what I'm asking is how I pass parameters to 'main' when the code is being loaded into the target.

If this is a ludicrous suggestion, I apologise!

Many thanks....James

Parents
  • One way of doing this is to have those parameters stored in 'ROM' space (as const variables). You could modify them in HEX-files directly (if you know where they are located) or by means of some simple Windows program (home-made, of course). At least this doesn't involve rebuilding the project ...

Reply
  • One way of doing this is to have those parameters stored in 'ROM' space (as const variables). You could modify them in HEX-files directly (if you know where they are located) or by means of some simple Windows program (home-made, of course). At least this doesn't involve rebuilding the project ...

Children
No data