From: SourceForge.net <no...@so...> - 2009-09-30 22:09:56
|
Bugs item #2870890, was opened at 2009-09-30 19:34 Message generated for change (Comment added) made by maartenbrock You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=2870890&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jelle Geerts (bughunter2) Assigned to: Nobody/Anonymous (nobody) Summary: initialization issue Initial Comment: 1. For sample code, please see the 'sample.c' attachment. 2. sdcc -mmcs51 --model-small -c src\sample.c 3. SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.9.2 #5492 (Aug 17 2009) (MINGW32) 4. I think I may have found an issue regarding the initialization code used for the 8051 target. The issue did not appear when using the Keil uVision dev environment, which is why I thought the issue may be SDCC specific. Please see the attached snippet. ---------------------------------------------------------------------- >Comment By: Maarten Brock (maartenbrock) Date: 2009-10-01 00:09 Message: Please compile with --debug and look at the generated sample.rst. It should contain the __str_1 initializer in the CONST area including the 0x00. Also check the hex file at that address for the 0x00. ---------------------------------------------------------------------- Comment By: Jelle Geerts (bughunter2) Date: 2009-09-30 22:55 Message: Oh, perhaps I should add that the first 12 bytes ("hello, world") of the string can correctly be read inside the function test(). Just the zero byte doesn't seem to be there (which is why I thought something could be wrong with the initialization). ---------------------------------------------------------------------- Comment By: Jelle Geerts (bughunter2) Date: 2009-09-30 22:44 Message: It does stop indeed, that is the point of this bug report. ---------------------------------------------------------------------- Comment By: Maarten Brock (maartenbrock) Date: 2009-09-30 22:41 Message: Jelle, I don't get it. What is wrong with the code? Since TESTSTR_LEN equals 12 it should never stop in function test, because the character at index 12 is \0. If it does stop in function test it could mean that __gptrget() does not work correctly for code memory on your device. Maarten ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=2870890&group_id=599 |