• 大小: 8.1MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-06
  • 语言: 其他
  • 标签: 飞思卡尔  

资源简介

第11届恩智浦智能小车摄像头组国赛程序源码.

资源截图

代码片段和文件信息

//-------------------------------------------------------------------------*
// 文件名:start.c                                                          *
// 说  明: CPU启动后进行系统配置                                           *
//-------------------------------------------------------------------------*

//头文件
#include “common.h“
#include “wdog.h“
#include “sysinit.h“

#pragma section = “.data“
#pragma section = “.data_init“
#pragma section = “.bss“
#pragma section = “CodeRelocate“
#pragma section = “CodeRelocateRam“ 

//内部函数声明
//-------------------------------------------------------------------------*
//函数名: common_startup                                                   *
//功  能: 复制中断向量表到RAM中                                            * 
//参  数: 无    *
//说  明: 将ROM中的初始化数据拷贝到RAM中                                   *
//-------------------------------------------------------------------------*
void common_startup(void);

//-------------------------------------------------------------------------*
//函数名: start                                                            *
//功  能: 系统启动                                                         * 
//参  数: 无    *
//说  明: 无                                                               *
//-------------------------------------------------------------------------*
void start(void)
{
    //关闭看门狗
    wdog_disable();
    //复制中断向量表到RAM中
    common_startup();
    //系统设置
    sysinit();
    //进入主函数
    main();
}


//-------------------------------------------------------------------------*
//函数名: common_startup                                                   *
//功  能: 复制中断向量表到RAM中                                            * 
//参  数: 无    *
//说  明: 将ROM中的初始化数据拷贝到RAM中                                   *
//-------------------------------------------------------------------------*
void common_startup(void)
{
    /* Declare a counter we‘ll use in all of the copy loops */
    uint32 n;
 
 
    /* Addresses for VECTOR_TABLE and VECTOR_RAM come from the linker file */  
    extern uint32 __VECTOR_TABLE[];
    extern uint32 __VECTOR_RAM[];

    /* Copy the vector table to RAM */
    if (__VECTOR_RAM != __VECTOR_TABLE)
    {
        for (n = 0; n < 0x410; n++)
            __VECTOR_RAM[n] = __VECTOR_TABLE[n];
    }
    /* Point the VTOR to the new copy of the vector table */
    write_vtor((uint32)__VECTOR_RAM);    
    
    /* Get the addresses for the .data section (initialized data section) */
    uint8* data_ram = __section_begin(“.data“);
    uint8* data_rom = __section_begin(“.data_init“);
    uint8* data_rom_end = __section_end(“.data_init“);
    
    /* Copy initialized data from ROM to RAM */
    n = data_rom_end - data_rom;
    while (n--)
      *data_ram++ = *data_rom++;
 
 
    /* Get the addresses for the .bss section (zero-initialized data) */
    uint8* bss_start = __section_begin(“.bss“);
    uint8* bss_

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-07-11 16:03  西部赛\
     目录           0  2016-07-12 12:06  西部赛\十一届摄像头\
     文件         167  2015-12-26 14:56  西部赛\十一届摄像头\11届摄像头.eww
     文件       72385  2015-12-26 14:56  西部赛\十一届摄像头\Backup of freescale ten.ewd
     文件       60842  2015-12-26 14:56  西部赛\十一届摄像头\Backup of freescale ten.ewp
     目录           0  2016-07-11 16:03  西部赛\十一届摄像头\Debug\
     目录           0  2016-07-12 12:06  西部赛\十一届摄像头\Debug\Exe\
     文件      390304  2016-07-12 12:06  西部赛\十一届摄像头\Debug\Exe\freescale ten.out
     文件       57215  2016-07-12 12:06  西部赛\十一届摄像头\Debug\Exe\freescale ten.sim
     文件      157292  2016-07-12 12:06  西部赛\十一届摄像头\Debug\Exe\freescale ten.srec
     目录           0  2016-07-12 12:06  西部赛\十一届摄像头\Debug\List\
     文件      117706  2016-07-12 12:06  西部赛\十一届摄像头\Debug\List\Control.lst
     文件       71230  2016-07-12 12:06  西部赛\十一届摄像头\Debug\List\Control.s
     文件       24019  2016-07-12 01:41  西部赛\十一届摄像头\Debug\List\DriveInit.lst
     文件       15768  2016-07-12 01:41  西部赛\十一届摄像头\Debug\List\DriveInit.s
     文件       74729  2016-07-12 01:41  西部赛\十一届摄像头\Debug\List\FireSCCB.lst
     文件       44143  2016-07-12 01:41  西部赛\十一届摄像头\Debug\List\FireSCCB.s
     文件       47600  2016-07-12 01:41  西部赛\十一届摄像头\Debug\List\FreeCars.lst
     文件       30751  2016-07-12 01:41  西部赛\十一届摄像头\Debug\List\FreeCars.s
     文件       50782  2015-12-26 14:56  西部赛\十一届摄像头\Debug\List\HAL_ADC.lst
     文件       34049  2015-12-26 14:56  西部赛\十一届摄像头\Debug\List\HAL_ADC.s
     文件       51245  2016-05-02 13:03  西部赛\十一届摄像头\Debug\List\HAL_SPI.lst
     文件       35935  2016-05-02 13:03  西部赛\十一届摄像头\Debug\List\HAL_SPI.s
     文件      407458  2015-12-26 14:56  西部赛\十一届摄像头\Debug\List\LCD.lst
     文件      230882  2015-12-26 14:56  西部赛\十一届摄像头\Debug\List\LCD.s
     文件       74068  2015-12-26 14:56  西部赛\十一届摄像头\Debug\List\LQ12864.lst
     文件       21696  2016-07-12 01:41  西部赛\十一届摄像头\Debug\List\MK60_FTM.lst
     文件       15927  2016-07-12 01:41  西部赛\十一届摄像头\Debug\List\MK60_FTM.s
     文件        2478  2015-12-30 14:12  西部赛\十一届摄像头\Debug\List\MK60_port.lst
     文件        2541  2015-12-30 14:12  西部赛\十一届摄像头\Debug\List\MK60_port.s
     文件       30432  2016-05-02 13:03  西部赛\十一届摄像头\Debug\List\MK60_spi.lst
............此处省略437个文件信息

评论

共有 条评论