CYACD file format line ending characters

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
DhDa_2432241
Level 5
Level 5
5 likes given First like received First like given

Hello, 
I have CYBLE-012011 evaluation board and the project I am working on has a bootloadable component in it. The bootloadable points to the bootloader which is configured as a UART bootloader. When I compile and build the project, it generates .cyacd file. So far so good.
 
CYACD FILE

   

1. The first line contains 12 characters and the lines following has 269 characters each excluding the LF('\n') character. 

But what I don't understand is in some cyacd files, the line ends with \r\n(CRLF) and in some cyacd files the lines end with \n(LF). Why is that?

I have attached a zip file(cyacd.zip) which has 2 cyacd files.

   

1. Blink,cyacd file is without the BLE component and each line ends with \n 

   

2. firmwareImage.cyacd is with BLE component and each line  ends with \r\n.

   

Suppose my flash data is :000000000.......789\r\n. What is being sent to the bootloader when bootloading using an embedded host using UART? Is CR part of the data to be sent?

Thanks
Dheeraj

 

0 Likes
1 Solution
Anonymous
Not applicable

Windows uses CR/LF, and Linux uses only LF I believe. I would ignore the line endings being different; It's not really relevant to any of the compilation/code/hex data for the end of file formatting.

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable

CRLF and LF are variations in line endings for different Operating Systems, and thus the formatting difference might be due to two different people accesssing the files using different operating systems: Windows vs. Linux for example.

0 Likes

Hello Pratt,
Both the .cyacd files were generated in Windows OS using PSOC creator. Then I copied these files to Linux OS. Then when I checked the line endings, one file ended with LF and another with CRLF. I am not sure why. I am observing differences in same OS. Not sure why.

Thanks 
Dheeraj

0 Likes
Anonymous
Not applicable

Windows uses CR/LF, and Linux uses only LF I believe. I would ignore the line endings being different; It's not really relevant to any of the compilation/code/hex data for the end of file formatting.

0 Likes
loop_y0u
Level 4
Level 4
25 replies posted 50 sign-ins 10 questions asked

How you guys are able to see the .cyacd file contains '\n' or '\r' ? I'm trying to open the .cyacd file in Notepad++ and PSOC Creator but can't see anything you mentioned in the previous response. Please Help me out too.

0 Likes