求助::
想用,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.
有奖活动 | |
---|---|
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
【有奖活动】震撼来袭!这场直播将直击工程师的心灵! | |
“我想要一部加热台”活动,不花钱赢取开发好工具!活动开始了哦 | |
【有奖活动】伙伴们:您的“需求”解决了吗? | |
抽奖了,抽奖了,金升阳医疗电源 |
打赏帖 | |
---|---|
【换取手持数字示波器】+与同事对定时器输出相位可调PWM移相全桥控制分享被打赏50分 | |
【换取手持数字示波器】+LP-MSPM0L1306开发板试用体验+串口被打赏40分 | |
CC-RL编译器相关问题求助被打赏10分 | |
【换取手持数字示波器】+与同事对ESP-12开发调试经验分享被打赏50分 | |
【换取手持数字示波器】+同事tek示波器调试spi解析被打赏50分 | |
【换取手持数字示波器】+2.6寸墨水屏调试经验被打赏50分 | |
换取手持数字示波器+个人开关电源的设计经验被打赏50分 | |
【换取手持数字示波器】+【APT32F173测评】+URAT被打赏20分 | |
【换取手持数字示波器】CH32X035的定时器以及外部中断体验被打赏50分 | |
【换取手持数字示波器】CH32X035搭建开发环境(RISC-V)被打赏50分 |