This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

6672 sysbios emif norflash 创建任务失败

Other Parts Discussed in Thread: SYSBIOS

请教各位专家:

开发环境:ccs5.5

msdk :mcsdk_2_01_02_06

目前在调试6672的emif norflah启动,我做了一个点灯的测试程序

1、裸机情况下可以正常启动。

2、加入sysbiso后,我在mian函数也点了几次灯,发现可以正常工作,然后在创建的任务里进行灯闪烁,程序无法正常运行,

3、我在编译时出现如下警告,不知与创建任务失败是否有关系

warning #10278-D: LOAD placement specified for section ".text:decompress:ZI:__TI_zero_init:rts6600_elf.lib<copy_zero_init.obj>". This section contains decompression routines required for linker generated copy tables and C/C++ auto-initialization.  Must ensure that this section is copied to run address before the C/C++ boot code is executed or is placed with single allocation specifier (ex. "> MEMORY").

目前我的分析是,创建任务失败,导致程序在不停的重启

下面是我的boot.asm,主要是执行程序搬移

.title "Flash bootup utility"

.ref _c_int00

.ref FLASH_TEXT_START

.ref RAM_TEXT_START

.ref TEXT_SIZE

.ref FLASH_CINIT_START

.ref RAM_CINIT_START

.ref CINIT_SIZE

.ref FLASH_CONST_START

.ref RAM_CONST_START

.ref CONST_SIZE

.ref FLASH_SWITCH_START

.ref RAM_SWITCH_START

.ref SWITCH_SIZE

.ref FLASH_VECT_START

.ref RAM_VECT_START

.ref VECT_SIZE

.ref FLASH_VECS_START

.ref RAM_VECS_START

.ref VECS_SIZE

.ref FLASH_META_START

.ref RAM_META_START

.ref META_SIZE

.ref FLASH_FARDATA_START

.ref RAM_FARDATA_START

.ref FARDATA_SIZE

.ref FLASH_NEARDATA_START

.ref RAM_NEARDATA_START

.ref NEARDATA_SIZE


.sect "bootload"
.global _boot
_boot:

nop 5

mvkl copyTable, a3 ; load table pointer

mvkh copyTable, a3

copy_section_top:

ldw *a3++, b0 ; byte count

ldw *a3++, b4 ; load flash start (load) address

ldw *a3++, a4 ; ram start address

nop 2

[!b0] b copy_done

nop 5

copy_loop:

ldb *b4++,b5

sub b0,1,b0 ; decrement counter

[b0] b copy_loop ; setup branch if not done

[!b0] b copy_section_top

zero a1

[!b0] and 3,a3,a1

stb b5,*a4++

[!b0] and -4,a3,a5 ; round address up to next multiple of 4

[ a1] add 4,a5,a3 ; round address up to next multiple of 4

copy_done:

mvkl .S2 _c_int00, B0

mvkh .S2 _c_int00, B0

b .S2 B0

nop 5

copyTable:

; count

; flash start (load) address

; ram start (run) address

;; .text

.word TEXT_SIZE

.word FLASH_TEXT_START

.word RAM_TEXT_START

;; .cinit

.word CINIT_SIZE

.word FLASH_CINIT_START

.word RAM_CINIT_START

;; .const

.word CONST_SIZE

.word FLASH_CONST_START

.word RAM_CONST_START

;; .switch

.word SWITCH_SIZE

.word FLASH_SWITCH_START

.word RAM_SWITCH_START

;; .vect

.word VECT_SIZE

.word FLASH_VECT_START

.word RAM_VECT_START

;; .VECS

.word VECS_SIZE

.word FLASH_VECS_START

.word RAM_VECS_START


;; .BIOS_META

.word META_SIZE

.word FLASH_META_START

.word RAM_META_START

;; .BIOS_FARDATA

.word FARDATA_SIZE

.word FLASH_FARDATA_START

.word RAM_FARDATA_START

;; .BIOS_FARDATA

.word NEARDATA_SIZE

.word FLASH_NEARDATA_START

.word RAM_NEARDATA_START

;; end of table

.word 0

.word 0

.word 0

以下我是修改后的cmd文件

-l "F:\dsp_workspace\sysBios_6672\Debug\configPkg\linker.cmd"
#if 1

--args 0x0
-heap 0x0
-stack 0x2000


MEMORY

{

L1PSRAM (RWX) : org = 0x0E00000, len = 0x7FFF
L1DSRAM (RWX) : org = 0x0F00000, len = 0x7FFF
L2SRAM (RWX) : org = 0x0800000, len = 0x080000
MSMCSRAM (RWX) : org = 0xc000000, len = 0x200000
//DDR3 (RWX) : org = 0x80000000, len = 0x10000000
boot : o = 0x70000000 l = 0x00000200
FLASH : o = 0x70000200 l = 0x3FFE00
}
xdc_runtime_Startup__EXECFXN__C = 1;
xdc_runtime_Startup__RESETFXN__C = 1;
TSK_idle = ti_sysbios_knl_Task_Object__table__V + 0;
SECTIONS
{

"bootload" : {} > boot
.text : {} > FLASH run = L2SRAM, LOAD_START(FLASH_TEXT_START), RUN_START(RAM_TEXT_START), SIZE(TEXT_SIZE)
.cinit : {} > FLASH run = L2SRAM, LOAD_START(FLASH_CINIT_START), RUN_START(RAM_CINIT_START), SIZE(CINIT_SIZE)
.const : {} > FLASH run = L2SRAM, LOAD_START(FLASH_CONST_START), RUN_START(RAM_CONST_START), SIZE(CONST_SIZE)
.switch : {} > FLASH run = L2SRAM, LOAD_START(FLASH_SWITCH_START), RUN_START(RAM_SWITCH_START), SIZE(SWITCH_SIZE)
.csl_vect : {} > FLASH run = L2SRAM, LOAD_START(FLASH_VECT_START), RUN_START(RAM_VECT_START), SIZE(VECT_SIZE)
.vecs : {} > FLASH run = L2SRAM, LOAD_START(FLASH_VECS_START), RUN_START(RAM_VECS_START), SIZE(VECS_SIZE)
xdc.meta : {} > FLASH run = L2SRAM, LOAD_START(FLASH_META_START), RUN_START(RAM_META_START), SIZE(META_SIZE)
.fardata : {} > FLASH run = L2SRAM, LOAD_START(FLASH_FARDATA_START), RUN_START(RAM_FARDATA_START), SIZE(FARDATA_SIZE)
.neardata : {} > FLASH run = L2SRAM, LOAD_START(FLASH_NEARDATA_START), RUN_START(RAM_NEARDATA_START), SIZE(NEARDATA_SIZE)

.ti.decompress: load > L2SRAM
.stack: load > L2SRAM
GROUP: load > L2SRAM
{
.bss:
.rodata:
}

.pinit: load >> L2SRAM
.init_array: load > L2SRAM
.data: load >> L2SRAM
.sysmem: load > L2SRAM
.far: load >> L2SRAM
.args: load > L2SRAM align = 0x4, fill = 0 {_argsize = 0x0; }
.cio: load >> L2SRAM
.ti.handler_table: load > L2SRAM
.c6xabi.exidx: load > L2SRAM
.c6xabi.extab: load > L2SRAM
}


#endif

谢谢!!!!!!!!!!!!!!!!!!!!!!!!!!

  • 自己结贴吧,找到原因了由于我的中断向量表没有指定到0x00~0x200

    修改cmd文件即可

    修改后的cmd问价如下:


    #if 1
    -l "F:\dsp_workspace\sysBios_6672\Debug\configPkg\linker.cmd"


    --args 0x0
    -heap 0x400
    -stack 0x4000


    MEMORY

    {
    VECTORS: org = 0x00800000 len = 0x00000200 /*set memory protection attribitue as execution only*/
    L2SRAM (RWX) : org = 0x800200, len = 0x7FE00
    MSMCSRAM (RWX) : org = 0xc000000, len = 0x400000
    DDR3 : org = 0x80000000, len = 0x20000000
    BOOT : org = 0x70000000, len = 0x00000200
    FLASH : org = 0x70000200, len = 0x3FFE00
    }
    xdc_runtime_Startup__EXECFXN__C = 1;
    xdc_runtime_Startup__RESETFXN__C = 1;
    TSK_idle = ti_sysbios_knl_Task_Object__table__V + 0;
    SECTIONS
    {

    "bootload" : {} > BOOT
    .text : {} > FLASH run = L2SRAM, LOAD_START(FLASH_TEXT_START), RUN_START(RAM_TEXT_START), SIZE(TEXT_SIZE)
    .cinit : {} > FLASH run = L2SRAM, LOAD_START(FLASH_CINIT_START), RUN_START(RAM_CINIT_START), SIZE(CINIT_SIZE)
    .const : {} > FLASH run = L2SRAM, LOAD_START(FLASH_CONST_START), RUN_START(RAM_CONST_START), SIZE(CONST_SIZE)
    .switch : {} > FLASH run = L2SRAM, LOAD_START(FLASH_SWITCH_START), RUN_START(RAM_SWITCH_START), SIZE(SWITCH_SIZE)
    //.csl_vect : {} > FLASH run = L2SRAM, LOAD_START(FLASH_VECT_START), RUN_START(RAM_VECT_START), SIZE(VECT_SIZE)
    .vecs : {} > FLASH run = VECTORS, LOAD_START(FLASH_VECS_START), RUN_START(RAM_VECS_START), SIZE(VECS_SIZE)
    xdc.meta : {} > FLASH run = L2SRAM, LOAD_START(FLASH_META_START), RUN_START(RAM_META_START), SIZE(META_SIZE)
    .fardata : {} > FLASH run = L2SRAM, LOAD_START(FLASH_FARDATA_START), RUN_START(RAM_FARDATA_START), SIZE(FARDATA_SIZE)
    .neardata : {} > FLASH run = L2SRAM, LOAD_START(FLASH_NEARDATA_START), RUN_START(RAM_NEARDATA_START), SIZE(NEARDATA_SIZE)

    .ti.decompress: load > L2SRAM
    .stack: load > L2SRAM
    GROUP: load > L2SRAM
    {
    .bss:
    .rodata:
    }

    .pinit: load >> L2SRAM
    .init_array: load > L2SRAM
    .data: load >> L2SRAM
    .sysmem: load > L2SRAM
    .far: load >> L2SRAM
    .args: load > L2SRAM align = 0x4, fill = 0 {_argsize = 0x0; }
    .cio: load >> L2SRAM
    // .ti.handler_table: load > L2SRAM
    .c6xabi.exidx: load > L2SRAM
    .c6xabi.extab: load > L2SRAM
    }


    #endif

  • 感谢分享!