So, I am developing an architecture based on ARM M0 on Altera DE2-115 board. I want to add new algorithm for uploading and debugging program using ULINK2. I have created the algorithm using _Template and wonder how to test it using the Test.uvproj since I can't yet upload a program using my new algorithm. Any answer will be helpful. Thanks!
Create a test frame work, build it to fit in RAM, and have the debugger script/ini load it into RAM. Execute/test from there
I've already created the test program with the corresponding algorithm from SP29GL064N Spansion Flash Datasheet. The algorithm works just fine (erase sector, erase chip, and page programming). However, I can only do it one time when the flash was all initialized by 0xFF. After the programming, every sector was filled with number from 0-1024 (as template), and I can't do the test anymore. I can, however, if I force erase my flash with my FPGA tool (Altera Control Panel). I have no idea why the contain of flash makes difference here, since I run everything from RAM. FYI, I am using cortex M0.
You can build algorithm as normal code(not PIC), and download it to RAM. Then use Keil to debug. Before you debug, some Keil debug settings should be configured. When in the debug window, you can set PC & MSP/PSP in register window, and then debug. Maybe you should check your ErasePage() and Uninit() functions.
Thankyou guys! I made it. However, I don't understand why it works. I only moved the flash to 0x08000000 from previously 0x00000000 in the hardware side. My code just follows. Anybody know why?