rtems with matlab autocode problems
Ralf Corsepius
ralf.corsepius at rtems.org
Thu Jun 17 03:18:22 UTC 2010
On 06/16/2010 07:48 PM, João Rasta wrote:
> Yes, here goes
>
> // dummy printf test code
> int upa(void)
> {
> int i = 0;
>
> for (i=0; i< 20; i++)
> printf("B\n");
>
> exit(0);
>
> }
>
> And the result is:
>
>
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
> ¬ÖUf
>
> Program exited normally.
Hmm, I am seeing "4 characters per line" instead of "1 or 2 characters
per line" as one would expect.
Are you sure your code uses the right printf? 4 chars instead of 1 could
indicate using UTF8 or UTF16 encoding instead of ACSII.
> sparc-rtems-gcc -c -O3 -g3 -ffloat-store -fPIC -DUSE_RTMODEL -DMODEL=gnc
> -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDI
> O -I. -I../../rtwlt/matlab/simulink/include
> -I../../rtwlt/matlab/extern/include -I../../rtwlt/matlab/rtw/c/src
> -I../../rtwlt/matlab/rtw/c/
> src/ext_mode/common -I. -I.. -I../../rtwlt/matlab/rtw/c/libsrc
> ../../rtwlt/matlab/rtw/c/src/rt_sim.c
... -O3 -g3 -ffloat-store -fPIC
certainly leave room for speculation on incompatibility.
-03 ... switches on dangerous optimizations
-ffloat-store ... could be incompatible to rtems-gcc/newlib
-fPIC ... unneeded, unused by the rtems-toolchains, unknown
side effects on rtems-gcc/newlib
Ralf
More information about the users
mailing list