当前位置:网站首页>The execution process before executing the main function after the DSP chip is powered on
The execution process before executing the main function after the DSP chip is powered on
2022-06-21 09:39:00 【ah_ yl】
With tms320f28377d For example :
Suppose we create a project test;
The documents to be noted in this project include ( See the picture 1):
1、 main.c file ;
2、 DSP Used to connect to .coff( Executable file ) Of .cmd file ;
3、 28377 Model appropriate F2837xD_CodeStartBranch.asm file

chart 1
main The specific contents of the procedure are as follows ( See the picture 2): Just one main application , Random content ;

chart 2
When we burn the project into dsp On chip in a chip FLASH when ,dsp How to execute the code in the chip when powered on ( Code execution process );
First , stay dsp In the online debugging state , Get into debug Interface , open view In the menu bar Disassembly Options ( See the picture 3); Here we can view the film flash Assembly code corresponding to different addresses on ;

chart 3
Open as follows : We click debug In the interface CPU Reset after ;
At this point, the chip restarts ; The running position of the code after restart is on-chip flash Address 0x3ff16a( See the picture 4), The code at this location is Ti Procedures that have been cured before leaving the factory , The function is to complete the bottom register , Environment configuration of stack, etc ;

chart 4
Next , wait for Ti At the bottom boot After the program is initialized ,DSP The chip will jump to 0x80000 To execute the user's first instruction ; We're at the address 0x80000 Set a breakpoint at ; Click continue ( See the picture 5);

chart 5
here , The program stops at the set breakpoint 0x80000 It's about , This is a dsp The bottom layer is powered on after execution boot after , Address of the first user instruction executed ;DSP Default flash start-up ,dsp Start up boot After the initialization , Program PC Set to flash Address of the 0x80000 To execute the user's first instruction , namely F2837xD_CodeStartBranch.asm In the document code_start function ( See the picture 6); Observe flash stay 0x80000 Memory contents at , There is only one jump instruction in the program 0048 201C ( The machine code means 004/ Jump to 8201C It's about ); namely LB _c_int00, Jump to function _c_int00;( Be careful : Suppose we configure cmd file ;BEGEIN: origin=0x082000,length=0x000002; When we connect the emulator online , The program can run normally , But when we don't connect the emulator , keep dsp The chip is powered on when the emulator is not connected , here , The program has indeed been burned into dsp Of flash In the chip , But the chip will not work normally after it is powered on ; because ,dsp At the completion of boot And then I'll run 0x80000 To execute the user's first instruction , And ours cmd In file :code_start:>BEGIN The first command of power on operation is written in flash 0x82000 It's about , and 0x80000 There is no executable code at , So our chip will not run after it is powered on )

chart 6
stay Disassembly Click step by step , The next instruction the program runs is _c_int00 function ; The function address is
0x8201C, Consistent with the jump address of the machine code ( See the picture 7); The main functions of this function are : Initialize registers and stacks for application layer code written by users ; Continue to step down ;(_c_int00 Save in boot28.asm in , This file is a library file , Not within the scope of user creation )

chart 7
You can find that the program runs to LCR __args_main This assembly instruction ( Still in _c_int00 Function ); This Assembly statement means to jump to __args_main Function and return ( if main Function cannot return, then the function cannot return );
Continue to click step by step , Get into __args_main Function ( See the picture 8);

chart 8
You can find ,__args_main The last instruction the function executes is written by the user main function ;(__args_main Function saved in args_main.c in , This file is a library file , Not within the scope of user creation )( See the picture 9)

chart 9
thus , We can DSP The process of power on operation is summarized as follows :

chart 10
边栏推荐
- stm32mp1 Cortex M4开发篇13:扩展板按键外部中断
- NLog自定义Target之MQTT
- Signal power spectrum estimation
- character string
- Stm32mp1 cortex M4 development part 12: expansion board vibration motor control
- 远程办公市场调查报告
- Embedded remote post, part-time job, order receiving, crowdsourcing platform
- Vuforia引擎支持的版本
- How to convert mindspire model to onnx format and use onnxruntime reasoning - development test
- 115. secondary packaging of table components
猜你喜欢

Summary of Web automated testing
![[actual combat] STM32 FreeRTOS migration series tutorial 2: FreeRTOS mutually exclusive semaphores](/img/df/197fc0861e004238a84766681c6e26.jpg)
[actual combat] STM32 FreeRTOS migration series tutorial 2: FreeRTOS mutually exclusive semaphores

Stm32mp1 cortex M4 Development Part 9: expansion board air temperature and humidity sensor control

【实战】STM32 FreeRTOS移植系列教程2:FreeRTOS 互斥信号量

Alibaba cloud OSS uploading and intelligent image recognition garbage recognition

\Processing method of ufeff

stm32mp1 Cortex M4开发篇12:扩展板震动马达控制

Solve the problem of error when typescript object gets value

Stm32mp1 cortex M4 development part 13: external interrupt of expansion board key

开课报名|「Takin开源特训营」第一期来啦!手把手教你搞定全链路压测!
随机推荐
121. Redux detailed summary + effect drawing + Case
equals 和 hashCode
[actual combat] STM32 FreeRTOS porting series Tutorial 4: FreeRTOS software timer
【实战】STM32MP157开发教程之FreeRTOS系统篇3:FreeRTOS 计数型信号量
Judge the data type of JS
113. summary of common usage of moment.js
Request and response must know
并发底层原理:线程、资源共享、volatile 关键字
Stream programming: stream support, creation, intermediate operation and terminal operation
Float floating layout clear floating
Style penetration of vant UI components -- that is, some styles in vant UI components cannot be modified
ArCore支持的設備
【实战】STM32 FreeRTOS移植系列教程5:FreeRTOS消息队列
Waiting in webdriver
[actual combat] STM32 FreeRTOS migration series tutorial 7: FreeRTOS event flag group
内部类
Get the data in the configuration file properties
How to generate QR code
It is said that this year gold three silver four has become gold one silver two.
Alibaba cloud OSS uploading and intelligent image recognition garbage recognition