完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我的一个程序里(用到了rts_EXT.lib;csl5416.lib;54xdsp.lib),好像是csl5416库出问题了,产生的编译warning是:E:softwaresCCStudio_v3.3C5400csllibcsl5416.lib: warning: linking incompatible formats: file compiled without -mf
然后,我将csl5416.lib换成csl5416x.lib,可以编译和load,可是运行却不对,运行到中断部分就无法进行了。以下给出了这个程序的两个版本,第一个是使用nearcall,程序在DARAM1~4中的;第二个是使用farcall,程序在SARAM1~4中的。其中第一个程序可以正常运行,第二个无法正常运行。 |
|
相关推荐
10 个讨论
|
|
我用的是DSP/BIOS编程,对开发环境不熟悉,原工作主要是MCU编程!我把一个历程的代码发一下您看看,跟我的工程代码遇到同样的问题,谢谢 cmD文件: /* Do *not* directly modify this file. It was */ /* generated by the Configuration Tool; any */ /* changes risk being overwritten. */ /* INPUT timer.cdb */ /* MODULE PARAMETERS */ -u _FXN_F_nop GBL_USERINITFXN = _FXN_F_nop; -u IDATA MEM_SEGZERO = IDATA; -u IDATA MEM_MALLOCSEG = IDATA; -u FXN_F_zero CLK_TIMEFXN = FXN_F_zero; -u CLK_F_frete CLK_HOOKFXN = CLK_F_frete; -u KNL_tick_stub PRD_THOOKFXN = KNL_tick_stub; -u IDATA RTDX_DATAMEMSEG = IDATA; -u IDATA HST_DSMBUFSEG = IDATA; -u GBL_NULL SWI_EHOOKFXN = GBL_NULL; -u GBL_NULL SWI_IHOOKFXN = GBL_NULL; -u SWI_F_exec SWI_EXECFXN = SWI_F_exec; -u SWI_F_run SWI_RUNFXN = SWI_F_run; -u IDATA TSK_STACKSEG = IDATA; -u _FXN_F_nop TSK_VCREATEFXN = _FXN_F_nop; -u _FXN_F_nop TSK_VDELETEFXN = _FXN_F_nop; -u _FXN_F_nop TSK_VEXITFXN = _FXN_F_nop; -u GBL_NULL IDL_CALIBRFXN = GBL_NULL; -u _UTL_doAbort SYS_ABORTFXN = _UTL_doAbort; -u _UTL_doError SYS_ERRORFXN = _UTL_doError; -u _UTL_halt SYS_EXITFXN = _UTL_halt; -u _UTL_doPutc SYS_PUTCFXN = _UTL_doPutc; -u _FXN_F_nop GIO_CREATEFXN = _FXN_F_nop; -u _FXN_F_nop GIO_DELETEFXN = _FXN_F_nop; -u _FXN_F_nop GIO_PENDFXN = _FXN_F_nop; -u _FXN_F_nop GIO_POSTFXN = _FXN_F_nop; /* OBJECT ALIASES */ _USERREGS = USERREGS; _BIOSREGS = BIOSREGS; _CSLREGS = CSLREGS; _VECT = VECT; _IDATA = IDATA; _IPROG = IPROG; _DARAM47 = DARAM47; _SARAM03 = SARAM03; _SARAM47 = SARAM47; _RTA_fromHost = RTA_fromHost; _RTA_toHost = RTA_toHost; _HWI_RS = HWI_RS; _HWI_NMI = HWI_NMI; _HWI_SINT17 = HWI_SINT17; _HWI_SINT18 = HWI_SINT18; _HWI_SINT19 = HWI_SINT19; _HWI_SINT20 = HWI_SINT20; _HWI_SINT21 = HWI_SINT21; _HWI_SINT22 = HWI_SINT22; _HWI_SINT23 = HWI_SINT23; _HWI_SINT24 = HWI_SINT24; _HWI_SINT25 = HWI_SINT25; _HWI_SINT26 = HWI_SINT26; _HWI_SINT27 = HWI_SINT27; _HWI_SINT28 = HWI_SINT28; _HWI_SINT29 = HWI_SINT29; _HWI_SINT30 = HWI_SINT30; _HWI_INT0 = HWI_INT0; _HWI_INT1 = HWI_INT1; _HWI_INT2 = HWI_INT2; _HWI_TINT = HWI_TINT; _HWI_SINT4 = HWI_SINT4; _HWI_SINT5 = HWI_SINT5; _HWI_SINT6 = HWI_SINT6; _HWI_SINT7 = HWI_SINT7; _HWI_SINT8 = HWI_SINT8; _HWI_SINT9 = HWI_SINT9; _HWI_SINT10 = HWI_SINT10; _HWI_SINT11 = HWI_SINT11; _HWI_SINT12 = HWI_SINT12; _HWI_SINT13 = HWI_SINT13; _HWI_SINT14 = HWI_SINT14; _HWI_SINT15 = HWI_SINT15; _KNL_swi = KNL_swi; _TSK_idle = TSK_idle; _userTask = userTask; _RTDX_dataPump = RTDX_dataPump; _LNK_dataPump = LNK_dataPump; _RTA_dispatcher = RTA_dispatcher; _LOG_system = LOG_system; _LogMain = LogMain; /* MODULE GBL */ SECTIONS [ .vers (COPY): [] /* version information */ ] -priority -llnkrtdx.a54f -ldrivers.a54f /* device drivers support */ -lsioboth.a54f /* supports both SIO models */ -lbios.a54f /* DSP/BIOS support */ -lrtdx_ext.lib /* RTDX support */ -lrts500EXT.lib /* C and C++ run-time library support */ /* MODULE MEM */ -stack 0x100 MEMORY [ PAGE 1: USERREGS: origin = 0x60, len = 0x1a PAGE 1: BIOSREGS: origin = 0x7c, len = 0x4 PAGE 1: CSLREGS: origin = 0x7a, len = 0x2 PAGE 0: VECT: origin = 0x7f80, len = 0x80 PAGE 1: IDATA: origin = 0x80, len = 0x7000 PAGE 0: IPROG: origin = 0x7080, len = 0xf00 PAGE 1: DARAM47: origin = 0x8000, len = 0x8000 PAGE 0: SARAM03: origin = 0x28000, len = 0x8000 PAGE 0: SARAM47: origin = 0x38000, len = 0x8000 ] /* MODULE CLK */ SECTIONS [ .clk: [ _CLK_start = FXN_F_nop; CLK_F_isr = FXN_F_nop; CLK_F_gethtime = FXN_F_zero; CLK_A_TABBEG = .; /* no CLK objs */ CLK_A_TABEND = .; CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1; ] > IDATA PAGE 1 ] _CLK_PRD = CLK_PRD; _CLK_COUNTSPMS = CLK_COUNTSPMS; _CLK_REGS = CLK_REGS; _CLK_USETIMER = CLK_USETIMER; _CLK_TIMERNUM = CLK_TIMERNUM; _CLK_TCR = CLK_TCR; _CLK_TDDR = CLK_TDDR; /* MODULE PRD */ SECTIONS [ .prd: [ PRD_A_TABBEG = .; /* no PRD objects */ PRD_A_TABEND = .; PRD_A_TABLEN = (. - PRD_A_TABBEG) / 12; ] > IDATA PAGE 1 ] /* MODULE RTDX */ _RTDX_interrupt_mask = 0x0; /* MODULE HWI */ SECTIONS [ .hwi_vec: [ GBL_F_chip = GBL_F_chip54x; ] > VECT PAGE 0 .hwi: [ /* no HWI stubs are necessary */ ] > SARAM03 PAGE 0 ] /* MODULE SWI */ SECTIONS [ .swi: [ SWI_A_TABBEG = .; *(.swi) SWI_A_TABEND = .; SWI_A_TABLEN = (. - SWI_A_TABBEG) / 14; ] > IDATA PAGE 1 ] /* MODULE TSK */ SECTIONS [ .tsk: [ TSK_A_TABBEG = .; *(.tsk) TSK_A_TABEND = .; TSK_A_TABLEN = (. - TSK_A_TABBEG) / 25; ] > IDATA PAGE 1 ] /* MODULE IDL */ SECTIONS [ .idl: [ IDL_A_TABBEG = .; *(.idl) IDL_A_TABEND = .; IDL_A_TABLEN = (. - IDL_A_TABBEG) / 1; IDL_A_CALBEG = .; *(.idlcal) IDL_A_CALEND = .; IDL_A_CALLEN = (. - IDL_A_CALBEG) / 1; ] > IDATA PAGE 1 ] SECTIONS [ .sysregs: [] > BIOSREGS PAGE 1 .bss: [] > IDATA PAGE 1 .far: [] > IDATA PAGE 1 .sysdata: align = 128 [ GBL_A_SYSPAGE = .; GBL_A_SYSDP = GBL_A_SYSPAGE >> 7; ] > IDATA PAGE 1 .dsm: [] > IDATA PAGE 1 .mem: [] > IDATA PAGE 1 .cio: [] > IDATA PAGE 1 .data: [] > IDATA PAGE 1 .gio: [] > IDATA PAGE 1 .sys: [] > IDATA PAGE 1 .rtdx_data: [] > IDATA PAGE 1 .TSK_idle$stk: [ *(.TSK_idle$stk) ] > IDATA PAGE 1 .userTask$stk: [ *(.userTask$stk) ] > IDATA PAGE 1 /* LOG_system buffer */ .LOG_system$buf: align = 0x40 [] > IDATA PAGE 1 /* LogMain buffer */ .LogMain$buf: align = 0x80 [] > IDATA PAGE 1 GROUP [ .const: [] .printf (COPY): [] ] > IDATA PAGE 1 .args: fill=0 [ *(.args) . += 0x4; ] > IDATA PAGE 1 /* RTA_fromHost buffer */ .hst1: align = 0x4 [] > IDATA PAGE 1 /* RTA_toHost buffer */ .hst0: align = 0x4 [] > IDATA PAGE 1 .trace: fill = 0x0 [ _SYS_PUTCBEG = .; . += 0x200; _SYS_PUTCEND = . - 1; ] > IDATA PAGE 1 .stack: [ GBL_stackbeg = .; *(.stack) GBL_stackend = ((GBL_stackbeg + 0x100 - 1) & 0xfffe) ; _HWI_STKBOTTOM = GBL_stackend; _HWI_STKTOP = GBL_stackbeg; ] > IDATA PAGE 1 .hst: [ HST_A_TABBEG = .; _HST_A_TABBEG = .; *(.hst) HST_A_TABEND = .; _HST_A_TABEND = .; HST_A_TABLEN = (. - _HST_A_TABBEG) / 5; _HST_A_TABLEN = (. - _HST_A_TABBEG) / 5; ] > IDATA PAGE 1 .log: [ LOG_A_TABBEG = .; _LOG_A_TABBEG = .; *(.log) LOG_A_TABEND = .; _LOG_A_TABEND = .; LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 6; _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 6; ] > IDATA PAGE 1 .pip: [ PIP_A_TABBEG = .; _PIP_A_TABBEG = .; *(.pip) PIP_A_TABEND = .; _PIP_A_TABEND = .; PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 34; _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 34; ] > IDATA PAGE 1 .sts: [ STS_A_TABBEG = .; _STS_A_TABBEG = .; /* no STS objects */ STS_A_TABEND = .; _STS_A_TABEND = .; STS_A_TABLEN = (. - _STS_A_TABBEG) / 8; _STS_A_TABLEN = (. - _STS_A_TABBEG) / 8; ] > IDATA PAGE 1 .IDATA$heap: [ IDATA$B = .; _IDATA_base = .; IDATA$L = 0x400; _IDATA_length = 0x400; . += 0x400; ] > IDATA PAGE 1 .pinit: [] > IPROG PAGE 0 .cinit: [] > IPROG PAGE 0 .gblinit: [] > IPROG PAGE 0 .trcdata: [] > IPROG PAGE 0 .rtdx_text: [] > IPROG PAGE 0 .bios:.norptb: [] > IPROG PAGE 0 frt: [] > SARAM03 PAGE 0 .bios: [] > SARAM03 PAGE 0 .text: [] > SARAM03 PAGE 0 .switch: [] > SARAM03 PAGE 0 .sysinit: [] > SARAM03 PAGE 0 ] 源程序: #include #include "timercfg.h" //#include "csl_irq.h" #include /*----------------------------------------------------------------------------*/ /* In this exmaple, we are simply setting the timer to interrupt */ /* every 0x800 clock cycles. All timer setup will be done in a */ /* TASK function that executes after exit from "main" */ /* Create a timer control structure */ TIMER_Config myTConfig = [ TIMER_TCR_RMK( TIMER_TCR_SOFT_WAITZERO, TIMER_TCR_FREE_NOSOFT, TIMER_TCR_TRB_RESET, TIMER_TCR_TSS_START, TIMER_TCR_TDDR_OF(0) ), /* TCR0 */ 0x0800u /* PRD0 */ ]; /* Global declarations */ TIMER_Handle mhTimer; volatile Uint16 timer_int_cnt = 0; void timer_isr(void); /*----------------------------------------------------------------------------*/ void main() [ /* Initialize CSL library, this step is required */ CSL_init(); ] /*----------------------------------------------------------------------------*/ void taskFunc() [ Uint16 eventId; int old_intm; Uint16 err = 0; LOG_printf(&LogMain," /* Temporarily disable all maskable interrupts, preserving */ /* previous state of INTM */ old_intm = IRQ_globalDisable(); /* Open Timer 0, this returns a pointer to a Timer Handle */ /* that will be used as an argument to other CSL functions */ mhTimer = TIMER_open(TIMER_DEV0, TIMER_OPEN_RESET); /* Write configuration structure values to Timer control */ /* registers. */ TIMER_config(mhTimer, &myTConfig); /* Get Event ID associated with Timer interrupt */ eventId = TIMER_getEventId(mhTimer); /* Clear any pending Timer interrupts */ IRQ_clear(eventId); /* Place event ID in interrupt map for dispatcher */ IRQ_map(eventId); /* Enable Timer interrupt */ IRQ_enable(eventId); /* Enable all maskable interrupts */ IRQ_globalRestore(old_intm); /* Start Timer */ TIMER_start(mhTimer); /* wait for 20 timer periods */ while(timer_int_cnt < 20); /* We are through with the Timer, so close it */ TIMER_close(mhTimer); if (timer_int_cnt < 20) ++err; LOG_printf(&LogMain,"Timer example %s",err?"FAILED":"PASSED"); LOG_printf(&LogMain," /*----------------------------------------------------------------------------*/ /* Timer ISR - will be called by DSP/BIOS dispatcher */ void timer_isr(void) [ TIMER_stop(mhTimer); timer_int_cnt = timer_int_cnt + 1; TIMER_start(mhTimer); ] 期待您的答复,或者我还需要给您提供一下什么文件! |
|
|
|
|
|
easonl 发表于 2019-1-29 11:29 中断向量表里的是否用了FB长跳转指令? 另外,建议您可以把中断子程序放在page0, 这样就不用长跳指令。 |
|
|
|
|
|
只有小组成员才能发言,加入小组>>
279 浏览 1 评论
494 浏览 2 评论
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
730 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
630 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1096 浏览 1 评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
204浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
166浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
40浏览 13评论
在使用3254进行录音的时候出现一个奇怪的现象,右声道有吱吱声,请教一下,是否是什么寄存器设置存在问题?
142浏览 13评论
TLV320芯片内部自带数字滤波功能,请问linein进来的模拟信号是否是先经过ADC的超采样?
140浏览 12评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-12 09:04 , Processed in 1.342998 second(s), Total 66, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号