Cypress技术论坛
直播中

李恩佳

7年用户 210经验值
私信 关注
[问答]

为什么编译后会生成错误的CY8C3866AXI-040?

有多少次是一个问题:我创建一个项目,cy8c5868axi-lp035项目没有错误。然后我做:项目& GT;设备选择器…编译后生成错误的CY8C3866AXI-040::不可打印字符0xef跳过主。C线建设的错误:不可打印字符0xbb跳过主。C线建设的错误:不可打印字符0xbf跳过C线为主。
我要创造main.txt,复制的文本从主。C和重命名.txt主。为什么????
ErrIn in MyMn.Zip
140.4 K

以上来自于百度翻译


     以下为原文
  a number of times there was a problem:
I'm creating a project for CY8C5868AXI-LP035 - project works without errors.
Then I do: Project-> Device Selector ... CY8C3866AXI-040
after compilation:
Build error: unprintable character 0xEF skipped    main.c    line1
Build error: unprintable character 0xBB skipped    main.c    line1
Build error: unprintable character 0xBF skipped    main.c    line1
    I had to create main.txt, copy the text from main.c and rename .txt to main.c
Why???


回帖(5)

杨军

2019-7-30 12:33:10
也许这会对这个问题有所启发。
HTTP://www. pSOCGooReR.COM/FUMRS/VIEW?PHP?F=48和t=11266
问候,Dana。

以上来自于百度翻译


     以下为原文
  Maybe this might shed some light on the problem -
     
        
              http://www.psocdeveloper.com/forums/viewtopic.php?f=48&t=11266
     
    Regards, Dana.
举报

李恩佳

2019-7-30 12:49:28
我认为还有一件事:我在主开始看到代码   C EF BB BF。
MNI
8 K

以上来自于百度翻译


     以下为原文
  I think there's something else:
I see code  EF  BB  BF at the beginning of main.c


举报

姜钰

2019-7-30 13:06:15
可能是在记事本(或其他编辑器)中打开了文件。字节序列0xEFBEF是UTF8中所谓的“字节顺序标记”,UTF8文件需要它来标记字节顺序(EndiaNess)。实际上是它的0xFFEF,但是在UTF8中它被重新编码。由于从PSoC3到5的切换改变了编译器(Keil对GCC),它也改变了字符编码的处理。对于UTF8,BOM是不需要的。
您可以尝试打开CyPress创建者中的文件,删除第一行,然后手动重新键入。这应该删除BOM。以后,尽量避免文件中的任何ULLUTT,这可能会导致编辑器切换到Unicode编码。避免记事本:

以上来自于百度翻译


     以下为原文
  Probably you opened the file in Notepad (or some other editor). The byte sequence 0xefbbef is the so-called "byte order mark" in UTF8, which is needed for UTF16 file to mark the byte order (endianness). Actually its 0xfeff, but in UTF8 it gets re-encoded. Since switching from PSoC3 to 5 changes the compiler (Keil vs. gcc), it also changes the handling of character encoding. For UTF8 the BOM is not needed.
    You can try to open the file in Cypress Creator, delete the first line and then re-type it manually. That should remove the BOM. In the future, try to avoid any umlauts in your file, which might cause the editor to switcxh to a Unicode-encoding. And avoid notepad :)
举报

李恩佳

2019-7-30 13:24:20
谢谢您。也许你是对的。我尽量不要使用其他编辑器。但是我尝试用三个编辑器编辑Meave.C(PSoC5),PoSOC3不会出现WordPad、记事本、记事本+ +错误。并且删除第一行-无济于事。错误仍然存在。如果没有人,除了我没有问题,让我们希望这是我的电脑问题。

以上来自于百度翻译


     以下为原文
  Thank you. Maybe you're right. I'll try not to use other editors.
But I tried to edit main.c (PSoC5) by three editors
WordPad, Notepad, NotePad + +    - error does not occur for PSoC3.
And removing the first row - does not help. The error remains.
If no one but me not had a problem then let's hope that this is the problem of my PC.
   
 
举报

更多回帖

发帖
×
20
完善资料,
赚取积分