Problem with global variables

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.
KaSo_1669721
Level 1
Level 1

Please help me

I've declared and defined the global variable...let say vrc and at the begining of main()

I've redefined vrc but when I print out the result, garbage was printed...why?(please refer file isg-no-enc-test-handle3.txt)

Any help is appreciated

Kamari

0 Likes
1 Solution

The sprintf() buffer variable "dbg" is defined quite too small. So some parts of your sram gets overwritten.

Is there a reason for the large stack size of 0x1200 bytes?

Bob

View solution in original post

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

Can you please post your complete project or a shortened version that shows the error so that we all can have a look at all of your settings. To do so, use

Creator->File->Create Workspace Bundle (minimal)

and attach the resulting file.

Which PSoC kit are you using? CY8CKIT-0??

Bob

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

Thanks Bob…I resend here

Thanks in advance for your help

Kamari

0 Likes

The sprintf() buffer variable "dbg" is defined quite too small. So some parts of your sram gets overwritten.

Is there a reason for the large stack size of 0x1200 bytes?

Bob

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

Thanks Bob

I’ll try today

Regarding stack size, actually no reason, just try n error

0 Likes

Thanks Bob

Everything back to normal now

Thanks again

Kamari

0 Likes