Anonymous
Not applicable
Oct 04, 2013
05:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 04, 2013
05:14 PM
Hello
To pass constant char address is bad.
It seems a random data or random address was passing through
On 8C21434, that have 512Byte SRAM (Large memory model)
Enable paging option and
Treat const as RAM option not for help
Do you think what is wrong?
///////////////////////////////////////////////////////
static char buf[32];
void SubTest( const char* str )
{
//..cstrcpy( buf, "Test2" ); <--- this is good
... cstrcpy( buf, str ); <--- this is BAD
... UART_Send( buf ); <--- think like as LCD_PrString();
}
///////////////////////////////////////////////////////
void main()
{
... SubTest(" Test1 "); <--- call from here
}
///////////////////////////////////////////////////////
This was not occur on another device, ever
C24223 (small memory model)
To pass constant char address is bad.
It seems a random data or random address was passing through
On 8C21434, that have 512Byte SRAM (Large memory model)
Enable paging option and
Treat const as RAM option not for help
Do you think what is wrong?
///////////////////////////////////////////////////////
static char buf[32];
void SubTest( const char* str )
{
//..cstrcpy( buf, "Test2" ); <--- this is good
... cstrcpy( buf, str ); <--- this is BAD
... UART_Send( buf ); <--- think like as LCD_PrString();
}
///////////////////////////////////////////////////////
void main()
{
... SubTest(" Test1 "); <--- call from here
}
///////////////////////////////////////////////////////
This was not occur on another device, ever
C24223 (small memory model)
Solved! Go to Solution.
Labels
- Labels:
-
PSoC 1
1 Solution
Oct 10, 2013
05:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2013
05:24 AM
I compiled this in both Imagecraft and HiTech, both compiled
without any errors.
I think you just needed the additional #includes.
Regards, Dana.
3 Replies
Oct 10, 2013
05:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2013
05:24 AM
I compiled this in both Imagecraft and HiTech, both compiled
without any errors.
I think you just needed the additional #includes.
Regards, Dana.
Anonymous
Not applicable
Oct 10, 2013
06:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2013
06:23 AM
Oh sorry, I am quite forgot this my post
I have been reporting to older article, here
http://www.cypress.com/?app=forum&id=1573&rID=86388
Thank you Dana-san
I have learn..
1) Don't miss (this is not missed in my case)
2) Don't overlooking any WARNINGs
Especially missing function prototype is cause of Fatal.
That is it.
I have been reporting to older article, here
http://www.cypress.com/?app=forum&id=1573&rID=86388
Thank you Dana-san
I have learn..
1) Don't miss
2) Don't overlooking any WARNINGs
Especially missing function prototype is cause of Fatal.
That is it.
Anonymous
Not applicable
Oct 10, 2013
06:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2013
06:24 AM
1) Don't miss [ string.h ] (this is not missed in my case)