完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我第一次使用28379D的芯片,在调试CLA时遇到了麻烦,希望能得到大家的帮助:
我使用汇编语言编写程序,在DUG模式下,CLA可以正常运行,一旦将芯片复位,就不能重新启动运行。 我怎么配置CMD文件才能使CLA的程序能从FLASH自动加载到RAM区,并自动运行? |
|
相关推荐
10 个讨论
|
|
“
我第一次使用28379D的芯片,在调试CLA时遇到了麻烦,希望能得到大家的帮助: 我使用汇编语言编写程序,在DUG模式下,CLA可以正常运行,一旦将芯片复位,就不能重新启动运行。 我怎么配置CMD文件才能使CLA的程序能从FLASH自动加载到RAM区,并自动运行? ” Eric: 你可以参考这个例程:C:ticontrolSUITEdevice_supportF2837xDv210F2837xD_examples_Cpu1cla_asincpu01 #ifdef _FLASH // // Copy over code from FLASH to RAM // memcpy((uint32_t *)&Cla1funcsRunStart, (uint32_t *)&Cla1funcsLoadStart, (uint32_t)&Cla1funcsLoadSize); #endif //_FLASH 另外,重新启动指的是上电重启吧? 如果的debug模式,要reset cpu, restart这样操作才可以。 - ERIC |
|
|
|
|
|
因为,我们的整个工程是用汇编语言构成的,所以我们的CMD文件也是自己配置的,我现在是不知道我的CMD文件那里出错了,导致CLA程序不能载入到FLASH中?以下是我们的CMD文件,能否请您帮忙诊断一下? MEMORY [ PAGE 0 : /* Program Memory */ /* Memory (RAM/FLASH) blocks can be moved to PAGE1 for data allocation */ /* BEGIN is used for the "boot to Flash" bootloader mode */ BEGIN : origin = 0x80000, length = 0x000002 // RAMM0 : origin = 0x000122, length = 0x0002DE // RAMD0 : origin = 0x00B000, length = 0x000800 RAMLS0 : origin = 0x008000, length = 0x000800 RAMLS1 : origin = 0x008800, length = 0x000800 RAMLS2 : origin = 0x009000, length = 0x000800 RAMLS3 : origin = 0x009800, length = 0x000800 RAMLS4 : origin = 0x00A000, length = 0x000800 // RAMGS14 : origin = 0x01A000, length = 0x001000 // RAMGS15 : origin = 0x01B000, length = 0x001000 RESET : origin = 0x3FFFC0, length = 0x000002 /* Flash sectors */ FLASHA : origin = 0x080002, length = 0x001FFE /* on-chip Flash */ FLASHB : origin = 0x082000, length = 0x001000 /* on-chip Flash */ FLASHB_1 : origin = 0x083000, length = 0x001000 /* on-chip Flash */ FLASHC : origin = 0x084000, length = 0x002000 /* on-chip Flash */ FLASHD : origin = 0x086000, length = 0x002000 /* on-chip Flash */ FLASHE : origin = 0x088000, length = 0x008000 /* on-chip Flash */ FLASHF : origin = 0x090000, length = 0x008000 /* on-chip Flash */ FLASHG : origin = 0x098000, length = 0x008000 /* on-chip Flash */ FLASHH : origin = 0x0A0000, length = 0x008000 /* on-chip Flash */ FLASHI : origin = 0x0A8000, length = 0x008000 /* on-chip Flash */ FLASHJ : origin = 0x0B0000, length = 0x008000 /* on-chip Flash */ FLASHK : origin = 0x0B8000, length = 0x002000 /* on-chip Flash */ FLASHL : origin = 0x0BA000, length = 0x002000 /* on-chip Flash */ FLASHM : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */ FLASHN : origin = 0x0BE000, length = 0x002000 /* on-chip Flash */ PAGE 1 : /* Data Memory */ /* Memory (RAM/FLASH) blocks can be moved to PAGE0 for program allocation */ BOOT_RSVD : origin = 0x000002, length = 0x000120 /* Part of M0, BOOT rom will use this for stack */ RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */ RAMD1 : origin = 0x00B800, length = 0x000800 RAMLS5 : origin = 0x00A800, length = 0x000800 RAMGS0 : origin = 0x00C000, length = 0x001000 RAMGS1 : origin = 0x00D000, length = 0x001000 RAMGS2 : origin = 0x00E000, length = 0x001000 RAMGS3 : origin = 0x00F000, length = 0x001000 RAMGS4 : origin = 0x010000, length = 0x001000 RAMGS5 : origin = 0x011000, length = 0x001000 RAMGS6 : origin = 0x012000, length = 0x001000 RAMGS7 : origin = 0x013000, length = 0x001000 RAMGS8 : origin = 0x014000, length = 0x001000 RAMGS9 : origin = 0x015000, length = 0x001000 RAMGS10 : origin = 0x016000, length = 0x001000 RAMGS11 : origin = 0x017000, length = 0x001000 RAMGS12 : origin = 0x018000, length = 0x001000 RAMGS13 : origin = 0x019000, length = 0x001000 CPU2TOCPU1RAM : origin = 0x03F800, length = 0x000400 CPU1TOCPU2RAM : origin = 0x03FC00, length = 0x000400 ] SECTIONS [ /* Allocate program areas: */ .cinit : > FLASHB PAGE = 0, ALIGN(4) .pinit : > FLASHB, PAGE = 0, ALIGN(4) .text : >> FLASHB | FLASHC | FLASHD | FLASHE PAGE = 0, ALIGN(4) // claprog : >> RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 |RAMLS4 PAGE = 0, ALIGN(4) ClaProg : LOAD = FLASHB_1, RUN = RAMLS0, LOAD_START(_Cla1funcsLoadStart), LOAD_END(_Cla1funcsLoadEnd), RUN_START(_Cla1funcsRunStart), LOAD_SIZE(_Cla1funcsLoadSize), PAGE = 0, ALIGN(4) // CLADataLS0 : > RAMLS0, PAGE=1 // CLADataLS1 : > RAMLS1, PAGE=1 // Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, PAGE = 1 // CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, PAGE = 1 .stack : > RAMM1 PAGE = 1 .ebss : >> RAMLS5 | RAMGS0 | RAMGS1 PAGE = 1 .esysmem : > RAMLS5 PAGE = 1 /* Initalized sections go in Flash */ // .econst : >> FLASHF | FLASHG | FLASHH PAGE = 0, ALIGN(4) // .switch : > FLASHB PAGE = 0, ALIGN(4) _c_int00 : > FLASHA PAGE = 0 wd_disable : > FLASHA PAGE = 0 codestart : > BEGIN, PAGE = 0 .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */ /* 。const_cla : LOAD = FLASHB, RUN = RAMLS0, RUN_START(_Cla1ConstRunStart), LOAD_START(_Cla1ConstLoadStart), LOAD_SIZE(_Cla1ConstLoadSize), PAGE = 1 */ ] |
|
|
|
|
|
qwer31 发表于 2018-9-11 14:09 “ 我用2837xD_FLASH_CLA_lnk_cpu1.cmd代替了我的CMD文件,CLA的程序照样不能烧录到FLASH中,可能会是什么问题导致的?以下是我的整个工程,请您帮忙诊断一下,为盼!谢谢 ” Eric: ||pwrite *xar7, *xar6++ prgrldrt: lret ;.text .sect "ClaProg" ;任务1,由定时器1触发 cla1isr1: mmov32 mr0,@0xa820 这个要改成大写的ClaProg, 和cmd定义一致, ClaProg : LOAD = FLASHD, RUN = RAMLS0, LOAD_START(_Cla1funcsLoadStart), LOAD_END(_Cla1funcsLoadEnd), RUN_START(_Cla1funcsRunStart), LOAD_SIZE(_Cla1funcsLoadSize), PAGE = 0, ALIGN(4) - ERIC |
|
|
|
|
|
只有小组成员才能发言,加入小组>>
351 浏览 1 评论
545 浏览 2 评论
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
790 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
660 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1140 浏览 1 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
83浏览 29评论
292浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
261浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
210浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
68浏览 13评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-28 01:55 , Processed in 1.256573 second(s), Total 77, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号