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.

Trouble Writing Memory Block at 0x0

Other Parts Discussed in Thread: LM3S8962, SYSBIOS

Hello, I'm totally new to CCS and ARM, but not new to embedded programming. I'm using the LM3S8962 eval board and attempting to run the generated mutex sysbios example code. While I've been able to get the example to load and run a few times, it's seems to crash or fail to load every other time I attempt to load and debug my test application. I've modified one thread in the example code to blink the LED on the board, seems simple enough.

The problem seems related to running a sysbios application as I was able to build and run most of the basic examples in the Stelarisware directories the other week. While I can get my program to load again after repeated power cycles and restarting CCS, this is an unacceptable solution. I've experienced a number of Java crashes of some sort as well. Any help getting this resolved would be greatly apprecaited, the follow error is typical:

 

CORTEX_M3_0: Flash Programmer: Timed out while writing to Flash memory

CORTEX_M3_0: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x57e8: Debug Port error occurred.

Cannot write to target

CORTEX_M3_0: Error: Debug Port error occurred.

 

Thanks,

Bob

  • Bob,

    I am not sure what is exactly happening. Is the error message being thrown when the SYSBIOS application is running or when you are trying to load it to the target?

    If the first case, it is probably something the BIOS team will be more capable to help you. If the second case, what version of CCS and example code are you using?

    Regards,

    Rafael

  • Rafael, thanks for the response. The problem seems to occur when flashing the firmware again after exiting a previous debug session. It's seems like it might be related to sysbios, but I've no idea whats going on at this point. It acts like CCS is not able to halt/reset the processor properly and gets confused. I tried issuing resets, etc but that hung CCS completely and I had to kill CCS from task manager. I've seen a number of java crashes also when things go wrong. The code I'm running is basically the mutex example I generated with the new project wizard. I'm running on Windows 7 and should have most the latest system updates & service packs applied. I've also installed the latest Java updates as well.

    Bob

  • Bob,

    Just a couple of comments/suggestions to add to Rafael's.

    You could try flashing the program using LMFlash Programmer instead of CCS for another data point. To use this tool though you have to convert the CCS generated .out file into .bin. This can be done as a post-build step in CCS using tiobj2bin utility. All the Stellarisware examples have this post-build step, so you can inspect one of those projects to get the command line. It would be under Project Properties->C/C++ Build->Build Steps tab.

    The LMFlash tool might also be helpful in just erasing the flash and then you could see if programming from CCS is successful.

    I would also advise using the latest version of CCS. If on CCSv4, that would be 4.2.4.

     

  • Hi AartiG,

    I converted my simple sysbios app to bin file as you suggested, but the LM Programmer just gives me the following:  **ERROR**:File Access Error.

    Not sure what this message means, I can access the file and open it in other text editors. The bin file seems rather large at 524,311 KB though, however I can open other Stellarisware sample bin files and load them successfully (eg the default game app that comes with the LM3S8962 eval board). Maybe it's a Win7 related thing, but I pulled the same tiobj2bin post build step into my generated mutex demo sysbios project.

    Bob

  • Bob,

    I'm not quite sure what the "File Access error" from LMFlash programmer means either, but it is certainly odd that you only have trouble with sysbios programs and not regular Stellarisware examples.

    Regarding the large file size for the bin file, these forum threads discuss the reason for it and provide workarounds.
    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/109389/389127.aspx#389127
    http://e2e.ti.com/support/embedded/f/355/t/110251.aspx

    Do you see the CCS flash programmer errors when loading any of the SYSBIOS examples or just certain ones? Do you happen to have access to another eval board to test out?

  • Yes, the flash error occurs when writing either the Stellaris samples or the SYSBIOS example. However, the SYSBIOS app seems to hang the board completely when I exit the debugger and the board appears hung and has to be power cycled.  Otherwise, the SYSBIOS app seems to run on the board from the debugger however.

    Another strange thing is that when I reset the board outside the debugger, my sysbios app doesn't appear to run. The app I used was the mutex example with a couple lines added to blink the LED.  However, the app seems to load and execute properly when the flash load doesnt fail - very strange..

    At any rate, I've decide to abandon SYSBIOS for now, it's just not worth the effort and hassle at this point. I don't any support for the Stellarisware library code being integrated or used with SYSBIOS either.

    Thanks

    Bob