-
1. Re: PSoC3->PSoC5 funny problem
user_14586677 Jun 23, 2014 12:30 PM (in response to user_49271930)Maybe this might shed some light on the problem -
http://www.psocdeveloper.com/forums/viewtopic.php?f=48&t=11266
Regards, Dana.
-
2. Re: PSoC3->PSoC5 funny problem
user_49271930 Jun 23, 2014 1:08 PM (in response to user_49271930)I think there's something else:
I see code \ EF \ BB \ BF at the beginning of main.c-
main_as_bin.png 8.0 K
-
-
3. Re: PSoC3->PSoC5 funny problem
user_78878863 Jun 23, 2014 3:14 PM (in response to user_49271930)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 :)
-
4. Re: PSoC3->PSoC5 funny problem
user_78878863 Jun 23, 2014 3:18 PM (in response to user_49271930)Some more information in Wikipedia: https://en.wikipedia.org/wiki/Byte_order_mark
-
5. Re: PSoC3->PSoC5 funny problem
user_49271930 Jun 23, 2014 3:48 PM (in response to user_49271930)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.
-
6. Re: PSoC3->PSoC5 funny problem
user_78878863 Jun 23, 2014 5:23 PM (in response to user_49271930)Windows notepad is known for adding the BOM whenever it thinks it shouds save in UTF8 (which might be the default for all non-english versions of Windows). If changing the first line doesn't help, you probably need to use a hex editor to fix that file (or copy anything except the first part of the file, usually its just comments, to a new file and use that one).
The Keil compiler seems to fine in accepting input with a BOM, whereas gcc doesn't like it. And given that its not receommended for UTF8, I cannot fault it for that...
-
7. Re: PSoC3->PSoC5 funny problem
user_49271930 Jun 24, 2014 12:50 AM (in response to user_49271930)I often open simultaneously Creator2.2 and Creator3.0 and copy text.
However, you explained the problem and no sense to find out details.
Thank you.