823032003 发表于 2010-9-21 19:09:15

大家中秋快乐。IAR 环境下 怎么样设置NEC单片机78K0的 选项字,

网上找到一个,但是编译发现Error: identifier "CPU_CHAR" is undefined D:\IAR\78K0\Heater\src\main.c 6
高手指点下、
以下摘抄自网上
#pragma constseg = OPTBYTE
__root const CPU_CHAR OptionByte=
{
    0x00,
    0x00,
    0x00,
    0x00,
    0x02
};
#pragma constseg = default使用NEC单片机的工程师知道,NEC的单片机里面有option byte这个东东。那么在IAR编译器里面怎么设置option byte呢?如上所示。感觉IAR编译器把OPTBYTE也做成一个关键字了。

guantingwei 发表于 2010-9-21 23:05:52

不要想那么复杂

__root const uint08 SECURITY_ID_BOOT0 @0x0085 = {
    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};

823032003 发表于 2010-9-22 10:38:19

回复【1楼】guantingwei
不要想那么复杂
__root const uint08 security_id_boot0 @0x0085 = {
    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};
-----------------------------------------------------------------------

选项字 不是5个字节吗??

yzvip7 发表于 2010-12-15 09:35:23

/******************************************************************************
**                        选项字节的配置
******************************************************************************/
#pragma location = 0X0080
__root const unsigned char option_byte[]={0x6E,0x00,0x00,0x03};

r166 发表于 2010-12-15 09:49:05

中秋快乐
页: [1]
查看完整版本: 大家中秋快乐。IAR 环境下 怎么样设置NEC单片机78K0的 选项字,