2098 views|0 replies

2015

Posts

0

Resources
The OP
 

C6678 multi-core DSP development - several key issues of hello world [Copy link]

a) Debugging tips:

breakpoint can set a breakpoint, and run to the breakpoint after pressing f8;

F5 executes step by step, and F8 executes all, which is different from VS.

Select the kernel you want to execute in the debug window, then right-click group cores to create a new group. The group includes several cores. Press F8 on this group to run several cores together.

Under the view menu, you can choose to observe registers, variable tracking, etc. to facilitate debugging.

b) About the project file description:

include is linked to the .h file library required by this project by default and basically does not need to be modified, except in special circumstances.

hello.c is the core code writing file, C language.

CMD file is the address configuration file of the hardware device, which is very important. At the beginning, I took a long detour because I didn't understand this file. The following is an introduction to this file.

ccxml is the target configuration file used to connect to the hardware board.

Sometimes you may encounter gel files. I still don’t understand what this gel file is and how to use it. I will study it later.

c) CMD file writing

cmd: Linker configuration file, which stores the linker configuration information. The cmd file enables developers to configure the system memory through their own defined memory modules. To put it simply, cmd is used to allocate ROM and RAM space, telling the linker how to calculate addresses and allocate space.

MEMORY command: describes the actual hardware resources of the system

SECTION command: describes how a "segment" is located

The key among them is the use of two pseudo-instructions, MEMORY and SECTIONS. MEMORY is used to build a model of the target memory. The SECTIONS instruction can arrange the positions of each segment according to this model. The MEMORY instruction can define various types of memory and capacity of the target system.

Copy the CMD file in hello world and analyze it:

-heap is the heap. I allocate 3M here because I allocate all segments on Share RAM (SHRAM). L2 has a total of 4M.

-stack is the stack, which is usually this big.

Memory is the address range and size of L1, L2, SHRAM, EMIF and DDR3. General applications will use DDR3. Since my board has not yet developed DDR3, I have to use SHRAM.

Fields in section:

.cinit stores the initial values and constants of variables in the program

.const stores character constants, floating-point constants, and constants declared with const in the program

.switch stores the jump address table of the switch statement in the program

.text stores program code

.bss reserves storage space for global and static variables in the program

.far reserves space for global and static variables declared with far in the program

.stack reserves storage space for the program system stack, which is used to save return addresses, pass parameters between functions, store local variables, and save intermediate results

.sysmem is used by malloc, calloc, and realoc functions in the program to dynamically allocate storage space

/****************************************************** ************************/

-c

-heap 0x300000 /*3MB*/

-stack0x10000

MEMORY

{

LOCAL_L2_SRAM: o = 0x00800000 l = 0x00080000 /* 512kB LOCAL L2/SRAM */

LOCAL_L1P_SRAM: o = 0x00E00000 l =0x00008000 /* 32kB LOCAL L1P/SRAM */

LOCAL_L1D_SRAM: o = 0x00F00000 l =0x00008000 /* 32kB LOCAL L1D/SRAM */

SHRAM: o = 0x0C000000 l = 0x00400000 /* 4MB Multicore shared Memmory */

EMIF16_CS2: o = 0x70000000 l = 0x04000000 /* 64MB EMIF16 CS2 Data Memory */

EMIF16_CS3: o = 0x74000000 l = 0x04000000 /* 64MB EMIF16 CS3 Data Memory */

EMIF16_CS4: o = 0x78000000 l = 0x04000000 /* 64MB EMIF16 CS4 Data Memory */

EMIF16_CS5: o = 0x7C000000 l = 0x04000000 /* 64MB EMIF16 CS5 Data Memory */

DDR3: o = 0x80000000 l = 0x80000000 /* 2GB CE0 and CE1 external DDR3 SDRAM */

}

SECTIONS

{

.text > SHRAM

.stack > SHRAM

.bss > SHRAM

.cio > SHRAM

.const > SHRAM

.data > SHRAM

.switch > SHRAM

.sysmem > SHRAM

.far > SHRAM

.args > SHRAM

.ppinfo > SHRAM

.ppdata > SHRAM

/* COFF sections */

.pinit > SHRAM

.cinit > SHRAM

/* EABI sections */

.binit > SHRAM

.init_array > SHRAM

.neardata > SHRAM

.fardata > SHRAM

.rodata > SHRAM

.c6xabi.exidx > SHRAM

.c6xabi.extab > SHRAM

}

This post is from DSP and ARM Processors
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list