This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Hello World



Hi,

I can't output "Hello World" to console window.

I have the below error with EVM6657 board.

C66xx_0: Trouble Writing Register PC: (Error -1176 @ 0x5760) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.0.872.0)

Also the below is my source code. It is very simple.

#include <stdio.h>

/*
 * hello.c
 */
int main(void) {
 fprintf(stderr, "Hello World!\n");
 
 return 0;
}

And I set stack size and heap size on CCS5.

What should I check for solving this error?

Please let me know.

Best regards,

Michi

 

  • Use printf to output to a console, you're using fprintf which is attempting to print to a file.

    Best Regards,

    Chad

  • Dear Chad-san,

    Thank you for your reply.

    I had used printf at first. But I had same error message.

    Is there any point what I should check?

    Best regards,

    Michi

     

  • Not sure, are there other error messages?  Is this the C6657LE or C6657L version (the LE has an emulation daughter card on it.)  If it's the LE are you connecting to the Emulation Daughter card?

    Right now it sounds more as if you're having an emulation problem.  I thought it might have been having in issue because it was trying to perform file writes through the emulator, but that doesn't sound like the case now.

    I'm going to move this over to the Code Composer Forum as they have more emulation specific knowledge.

    Best Regards,

    Chad

  • Michi,

    When the error happens? Is it during execution or during program load?

    Considering you already set up heap and stack (try 0x400 for both), usually projects that fail miserably like yours have a missing linker CMD file - if none is present in your project, the linker tries to allocate everything starting at address 0x0.

    Another idea is if the processor is somehow hanging/resetting during program execution, and the emulator is being fooled into thinking that an invalid memory is being accessed. I would think this is a much harder scenario to happen given your program is very simple.

    Another scenario that could happen is a GEL file that somehow misconfigures the processor and causes it to reset - another hard scenario, I must admit.

    Hope this helps,

    Rafael

     

  • Dear Rafael-san,

    Thank you for your support. Your are right. I missed a linker CMD file.  After I added it to my project, it worked.

    I appreciate your support.

    Best regards,

    Michi