Psoc creator 3.1 edit C file

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.
Anonymous
Not applicable

I install a new version og Psoc creator 3.1 and when try to view or modify the main code  of my project and when arrive near to the 1500 line of code , the code it is 5000 line , it is not possible view the code in corretct way because the last line it is too long and it is a single line.
The problem it is present on any file that have a 1200.1500 line.
Incredible but  the compilation work fine but it is impossible modify the file over the line 1500.
The previus version 3,0 not have this problem.
I try to install the the Psoc creator 3.1 on my portable computer e this problem not appair but on my portable computer it is not present other version of the Psoc Creator.
I working from two years with Psoc creator and not have never one problem and i developped 6 board using the Psoc5 and the Psoc4 with glad.
I think that this problem would to be caused because i have the all version , 2,2 to 3.1 installed on my computer.
The OS it is Microsot Windows XP service pack 3 italian version.

I attach the project for your analisis

Thank for your help

Giorgio T.
 

0 Likes
15 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I can edit main.c several places beyond line 1500, all the way to bottom of file.

   

 

   

Maybe uninstall, manually erase all folders in program folder file on your PC.

   

 

   

Regards, Dana.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I don't have any problems opening your project under win7 and editing your main.c past line 5000.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I am running under Windows 8.1

   

 

   

If you google I think you can find utilities that strip out non printable

   

ASCII from a file, possibly you have an embedded character driving

   

the editor nuts.

   

 

   

 

   

Regards, Dana.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Thank you for yours Help and for explain better the problem i am attach a screen_shot where in red color see the problem.

   

 

   

Thank you

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I see the embedded little square box characters imbedded in line 1119,

   

displayed, and that looks abnormal  to say the least. They look like CR-LF

   

chars, but should not display. One approach would be to use the delete

   

key at the beginning of the line and erase the line until you start getting

   

good code lines. Make a copy of file before you do this. Record what you

   

do see for the partially erased line as you keep deleting chars so you

   

know what the code you need to reinsert looked like.

   

 

   

As an aside, splitting up your code into seperate functional .c files for

   

future projects probably a good idea for the very reason you have now.

   

If one file gets creamed you at least have the body of code still OK in

   

the rest of the .c files. And just a good practice in general. Makes it

   

easy as a programmer when coding not to have to wade thru the entire

   

code base looking for a problem you are trying to resolve. And just more

   

"readable" when segregated into logical functional code units.

   

 

   

Do you have backups you can resurrect the file from ? Also if you google

   

and get a ASCII file viewer utility you can potentially get rid of the offensive

   

chars in the file, make a copy of the file before you attempt this.

   

 

   

Regards, Dana.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Try opening the file in windows editor using "open with" dialog from explorer. Try to change and re-write the file...

   

 

   

Bob

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

I have seen similar issues with Cypress code in a PSoC4 BLE project. I was looking into some generated code (or debugging into it) and the editor just showed a huge amount of code in the last line of the editor (cannot remember which file it was though).

0 Likes
Anonymous
Not applicable
        Hi , but not undestand if you have solver this problem because i follow the suggest from the communyty but the situation it is the same. best regard Giorgio T.   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Try opening your file in a win7 or newer version. If that works I would suggest you to upgrade from the no-longer supported winXP to a newer version.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Here is a freeware hex editor you can try to repair the

   

file with -

   

 

   

    

   

          http://www.catch22.net/software/hexedit

   

 

   

Regards, Dana.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Actually I don't think that the file itself is corrupted, just the display is wrong. But I will check when I encounter it for the next time.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You might be right, but I have encountered this very problem before

   

and a hex editor saved my but. After all disk and memory writes are

   

not error free all the time, otherwise Heisenburg would turn over in

   

his grave. I do remember for a while on XP machines windows had a

   

flawed disk caching dll, unfortunatley I do not remember what SP fixed

   

it.

   

 

   

Regards, Dana.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

OK, maybe I have a different issue. I just saw it again - if you have a PSoC4 BLE project, look at the generated CYBLE_eventHandler.c file in Creator. In my case starting at line 920 everything is in one line, even thought the file is correct on disk (no wrong line-breaks). I did not test what happens when I save the file, though.

   

   

 

   

   

 

   

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Oh, I should have cropped that first image 😞

0 Likes
RiMo_301056
Level 3
Level 3
25 sign-ins First solution authored 10 replies posted

Hi Giorgio,

I had exactly the same problem and found a possible solution.

See here:

Code editor shows empty squares instead of line breaks

https://community.cypress.com/thread/32218

Best regards,

Ricardo