求助::
想用,IAR +Wiggler 调试44B0 可是不知道怎样调试下栽到sdram
You must configure the memory controller before you download your application code. You can do this best by using a C-SPY macro function that is executed before the code download takes place—execUserPreload(). The macro functions __writeMemory32() will perform the necessary initialization of the memory controller. The following example illustrates a macro used to setup the memory controller and remap on the Atmel AT91EB55 chip, similar mechanisms exist in processors from other ARM vendors. execUserPreload() { __message "Setup memory controller, do remap command\n"; // Flash at 0x01000000, 16MB, 2 hold, 16 bits, 3 WS __writeMemory32(0x01002529, 0xffe00000, "Memory"); // RAM at 0x02000000, 16MB, 0 hold, 16 bits, 1 WS __writeMemory32(0x02002121, 0xffe00004, "Memory"); // unused __writeMemory32(0x20000000, 0xffe00008, "Memory"); // unused __writeMemory32(0x30000000, 0xffe0000c, "Memory"); // unused __writeMemory32(0x40000000, 0xffe00010, "Memory"); // unused __writeMemory32(0x50000000, 0xffe00014, "Memory"); // unused __writeMemory32(0x60000000, 0xffe00018, "Memory"); // unused __writeMemory32(0x70000000, 0xffe0001c, "Memory"); // REMAP command __writeMemory32(0x00000001, 0xffe00020, "Memory"); // standard read __writeMemory32(0x00000006, 0xffe00024, "Memory"); } Note that the setup macro execUserReset() may have to be defined in the same way to reinitialize the memory mapping after a C-SPY reset. This can be needed if you have setup your hardware debugger system to do a hardware reset on C-SPY reset. It can be convenient to register a macro file during the C-SPY startup sequence, especially if you have several ready-made macro functions. C-SPY can then execute the macros before main is reached. You achieve this by specifying a macro file which you load before starting the debugger. Your macro functions will be automatically registered each time you start the C-SPY Debugger. If you define the macro functions by using the setup macro function names you can define exactly at which stage you want the macro function to be executed. Follow these steps: 1 Create a new text file where you can define your macro function. For example: execUserSetup() {... _ _orderInterrupt("IRQ", 4000, 2000, 0, 0, 100); } This macro function generates a repeating interrupt that is first activated after 4000 cycles and then repeated approximately every 2000th cycle. Because the macro is defined with the execUserSetup() function name, it will be executed directly after your application has been downloaded. 2 Save the file using the filename extension mac. 3 Before you start C-SPY, choose Project>Options and click the Setup tab in the Debugger category. Select the check box Use Setup file and choose the macro file you just created. The interrupt macro will now be loaded during the C-SPY startup sequence.
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
基于MSPM0L1306的MODBUS-RTU协议通讯实验被打赏50分 | |
每周了解几个硬件知识+485硬件知识分享被打赏10分 | |
【换取手持示波器】树莓派PICOW网页烟花被打赏18分 | |
【换取手持示波器】树莓派PICO逻辑分析仪被打赏16分 | |
【分享评测,赢取加热台】教你五分钟本地部署蒸馏版本的DeepSeekR1-7B被打赏12分 | |
【换取手持示波器】蓝牙音箱更换电池被打赏8分 | |
【换取手持示波器】鼠标更换微动开关被打赏10分 | |
【我要开发板】4.传感器移植被打赏50分 | |
【换取手持数字示波器】RISC-VGCC使用-fno-omit-frame-pointer编译选项实现栈回溯被打赏29分 | |
【分享评测,赢取加热台】+开关电源简述被打赏7分 |