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

How to include a Hex along with C codes in uv2 simulator?

Hi, there,

I want to use uv2 to debug a system consisting of a set of C codes and one hex file. The C codes will read the data from this hex file.

In uv2, I have created a project for this set of C codes, I can debug/trace the their execution.

The question is how to include the Hex file into this project?

Plausible solution 1, I added the Hex file into the project along with the C codes, and specify the Hex file's type as "Text file". The C codes could *not* read the data from the Hex file correctly.

Plausible solution 2, in the "Options for Task" popup utility, there is a Linker panel. However, I didn't figure out where to put the Hex file.

Any suggestion?

For details of my task, please refer to the following discussion thread.

http://www.keil.com/forum/docs/thread3564.asp

Kan

Parents
  • Andy,

    I converted the Hex file into a C code, which only contained a byte(int) array.

    Then I added this byte array C code into the uv2 project, rebuilt this C code with all the others.

    It worked.

    The reason I asked the question is that when I want to change the content of the Hex file. I have to re-generate the C code, and then rebuilt the projects.

    Therefore, the problem is that how to access the content of a Hex file which is dynamically loaded. And furthermore, it is not necessary to be a Hex file, all I want is a data file, which is ultimately stored in ROM.

    Anyway, this is not a big issue, only for the convenience of debugging.

    thanks,
    Kan

Reply
  • Andy,

    I converted the Hex file into a C code, which only contained a byte(int) array.

    Then I added this byte array C code into the uv2 project, rebuilt this C code with all the others.

    It worked.

    The reason I asked the question is that when I want to change the content of the Hex file. I have to re-generate the C code, and then rebuilt the projects.

    Therefore, the problem is that how to access the content of a Hex file which is dynamically loaded. And furthermore, it is not necessary to be a Hex file, all I want is a data file, which is ultimately stored in ROM.

    Anyway, this is not a big issue, only for the convenience of debugging.

    thanks,
    Kan

Children