5361|4

2

帖子

0

TA的资源

一粒金砂(初级)

楼主
 

LM3S系列的芯片对于芯片有固化驱动库和没有固化驱动库的区别 [复制链接]

LM3S系列的芯片对于芯片有固化驱动库和没有固化驱动库的区别

今天在选型的时候发现,有一个区别,对于有Stellarisware in rom 和没有Stellarisware in rom的LM3S型号的芯片在使用驱动库函数的时候有什么区别吗,固化和没固化有什么优势吗?

最新回复

Luminary Micro先后推出3代Stellaris(群星)系列ARM,都采用性能先进的Cortex-M3处理器内核: 第一代:Sandstorm(沙暴) 第二代:Fury(狂暴) 第三代:DustDevil(尘魔) 近期,有多个客户在咨询Luminary第三代产品DustDevil家族内部集成的ROM库函数如何使用的问题,现总结如下,供大家参考交流: 驱动库函数固化在ROM当中,好处有: 1. 不会占用用户的任何Flash资源 2. 最大限度提高代码密度 3. 加快程序执行速度 4. 这是Luminary免费提供的,不存在版权问题(royalty-free) 5. 固化的驱动库同时也是bootloader(即ISP下载),提供UART、I2C、SSI等多种接口 【ROM库函数用法1】 ● 首先保证你使用的芯片属于Luminary Micro第三代产品DustDevil家族,如LM3S5749 ● 在程序的开头做如下定义:     #define  TARGET_IS_DUSTDEVIL_RA0     #include   ● 然后在每个调用的库函数名前面加上ROM_前缀就可以了 【ROM库函数用法2】 ● 首先保证你使用的芯片属于Luminary Micro第三代产品DustDevil家族,如LM3S5749 ● 在程序的开头做如下定义:     #define  TARGET_IS_DUSTDEVIL_RA0     #include       #include   ● 然后在每个调用的库函数名前面加上MAP_前缀就可以了 前缀MAP_要比前缀ROM_可移植性好 【注意事项】     驱动库版本不能太旧,否则不会支持ROM库特性     ROM库不支持某些库函数,如SysCtlDelay()  详情 回复 发表于 2012-5-10 09:16
 
点赞 关注

回复
举报

64

帖子

0

TA的资源

一粒金砂(中级)

沙发
 
固化了的,可以调用rom里面的库以节省flash的占用空间。
 
 

回复

7247

帖子

192

TA的资源

五彩晶圆(高级)

板凳
 

回复 沙发 慢慢来 的帖子

shifou是否 等高手解答啊 不太清楚对不对
 
 
 

回复

33

帖子

0

TA的资源

一粒金砂(高级)

4
 

回复 楼主 yutingcfwcfw 的帖子

首先感谢你对TI Stellaris系列MCU的关注。
1,TI Stellaris系列MCU有一个非常有优势的特点,就是免费提供称为StellarisWare的固件开发包,如果没有安装,请到TI网站搜索下载并安装。
2, TI Stellaris系列MCU的ROM根据型号的不同,可能会包含ROM Software Libraries, ROM Bootloader,ROM AES/CRC Tables。一般ROM Software Libraries与ROM Bootloader同时存在,而ROM AES/CRC Tables则不一定。
3,在 StellarisWare安装目录下的docs文件夹下,有《SW-DRL-UG-xxxx》(xxxx代表StellarisWare的发布版本号),它是Stellaris® Peripheral Driver Library USER’S GUIDE。第26章“Using the ROM”会对于ROM的使用有详细的讲解。

为了大家的方便,简单摘录几段如下:
“26.1    Introduction
By utilizing the code in the on-chip ROM, more flash is available for use by the application.
The boot loader is also contained within the ROM, which can be called by an application in order to
start a firmware update.”

“26.2    Direct ROM Calls
In order to call the ROM, the following steps must be performed:
1,The device on which the application will be run must be defined.  This is done by defining a
preprocessor symbol, which can be done either within the source code or in the project that
builds the application. The later is more flexible if code is shared between projects.
2, driverlib/rom.h is included by the source code desiring to call the ROM.
3, The ROM version of a peripheral driver library function is called. For example, if GPIODirMod-
eSet() is to be called in the ROM, ROM_GPIODirModeSet() is used instead.

A define is used to to select the device being used since the set of functions available in the ROM
must be a compile-time decision; checking at run-time does not provide any flash savings since
both the ROM call and the flash version of the API would be in the application flash image.

The following defines are recognized by driverlib/rom.h:
TARGET_IS_DUSTDEVIL_RA0   The application is being built to run on a DustDevil-class de-
vice, silicon revision A0.
TARGET_IS_TEMPEST_RB1       The application is being built to run on a Tempest-class device,
silicon revision B1.

By using ROM_Function(), the ROM will be explicitly called. If the function in question is not avail-
able in the ROM, a compiler error will be produced.

See the Stellaris ROM User’s Guide for details of the APIs available in the ROM.”

“26.3    Mapped ROM Calls
When code is intended to be shared between projects, and some of the projects run on devices with
a ROM and some run on devices without a ROM, it is convenient to have the code automatically
call the ROM or the flash version of the API without having #ifdef-s in the code.  rom_map.h
provides an automatic mapping feature for accessing the ROM. Similar to the ROM_Function()
APIs provided by rom.h, a set of MAP_Function() APIs are provided. If the function is available in
ROM, MAP_Function() will simply call ROM_Function(); otherwise it will call Function().

In order to use the mapped ROM calls, the following steps must be performed:
1, Follow the above steps for including and using driverlib/rom.h.
2, Include driverlib/rom_map.h.
3, Continuing the above example, call MAP_GPIODirModeSet() in the source code.

As in the direct ROM call method, the choice of calling ROM versus the flash version is made at
compile-time.  The only APIs that are provided via the ROM mapping feature are ones that are
available in the ROM, which is not every API available in the peripheral driver library.

The following is an example of calling a function in shared code, where the device in question is
defined in the project file:

#include  "driverlib/rom.h"
#include  "driverlib/rom_map.h"
#include  "driverlib/systick.h"

void
SetupSysTick(void)
{
    MAP_SysTickPeriodSet(0x1000);
    Map_SysTickEnable();
}”
 
 
 

回复

2452

帖子

19

TA的资源

五彩晶圆(中级)

5
 
Luminary Micro先后推出3代Stellaris(群星)系列ARM,都采用性能先进的Cortex-M3处理器内核:
第一代:Sandstorm(沙暴)
第二代:Fury(狂暴)
第三代:DustDevil(尘魔)


近期,有多个客户在咨询Luminary第三代产品DustDevil家族内部集成的ROM库函数如何使用的问题,现总结如下,供大家参考交流:


驱动库函数固化在ROM当中,好处有:
1. 不会占用用户的任何Flash资源
2. 最大限度提高代码密度
3. 加快程序执行速度
4. 这是Luminary免费提供的,不存在版权问题(royalty-free)
5. 固化的驱动库同时也是bootloader(即ISP下载),提供UART、I2C、SSI等多种接口


【ROM库函数用法1】
● 首先保证你使用的芯片属于Luminary Micro第三代产品DustDevil家族,如LM3S5749
● 在程序的开头做如下定义:
    #define  TARGET_IS_DUSTDEVIL_RA0
    #include  
● 然后在每个调用的库函数名前面加上ROM_前缀就可以了


【ROM库函数用法2】
● 首先保证你使用的芯片属于Luminary Micro第三代产品DustDevil家族,如LM3S5749
● 在程序的开头做如下定义:
    #define  TARGET_IS_DUSTDEVIL_RA0
    #include  
    #include  
● 然后在每个调用的库函数名前面加上MAP_前缀就可以了

前缀MAP_要比前缀ROM_可移植性好


【注意事项】
    驱动库版本不能太旧,否则不会支持ROM库特性
    ROM库不支持某些库函数,如SysCtlDelay()
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/10 下一条
有奖直播:当AI遇见仿真,会有什么样的电子行业革新之路?
首场直播:Simcenter AI 赋能电子行业研发创新
直播时间:04月15日14:00-14:50

查看 »

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

 
机器人开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网 6

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表