You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. compile the sample program and library for uCLinux with cross compiler
m68k-ucLinux-gcc ( m68k-uclinux-tools)
this is done for example :
# /usr/local/m68k-uclinux-tools/bin/m68k-uclinux-g++ -o JSonClient-SPOTM3
main.o -pipe -m5307 -static -Wl,-elf2flt='-s 8196' -Wl,-move-rodata
where main is the example provided bby rapidjason.
2. copy the binary JSonClient-SPOTM3 to the coldfire box with uCLinux.
3. run the binary
What is the expected output? What do you see instead?
Where Output in Linux/x86 platform is
----------------------------------------
Original JSON:
{ "hello" : "world", "t" : true , "f" : false, "n": null, "i":123, "pi": 3.1416, "a":[1, 2, 3, 4] }
Parsing in-situ with a buffer.
Parsing to document succeeded.
Access values in document:
hello = world
t = true
f = false
n = null
i = 123
pi = 3.1416
a[0] = 1
a[1] = 2
a[2] = 3
a[3] = 4
Modified JSON with reformatting:
{
"hello": "rapidjson",
"t": true,
"f": false,
"n": null,
"i": 2432902008176640000,
"pi": 3.1416,
"a": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
"Lua",
"Mio"
],
"author": "Milo Yip"
}
when running in uCLinux / coldfire platform
----------------------------------------------
Original JSON:
{ "hello" : "world", "t" : true , "f" : false, "n": null, "i":123, "pi": 3.1416, "a":[1, 2, 3, 4] }
Parsing in-situ with a buffer.
Parsing to document succeeded.
Access values in document:
hello = world
t = true
f = false
n = null
i = 0
pi = 3.1416
a[0] = 0
a[1] = 0
a[2] = 0
a[3] = 0
Modified JSON with reformatting:
{
"hello": "rapidjson",
"t": true,
"f": false,
"n": null,
"i": 2432902008176640000,
"pi": 3.1416,
"a": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
"Lua",
"Mio"
],
"author": "Milo Yip"
}
What version of the product are you using? On what operating system?
Version is 0.11 and running in uCLinux in a coldfire processor.
Please provide any additional information below.
You can get the compiler from
http://www.codesourcery.com/downloads/public/gnu_toolchain/m68k-uclinux/freescal
e-coldfire-4.3-209-m68k-uclinux.bin
Note: As a surprise this works on linux and when compiling for ARM processor
with the crosscompiler /opt/arm/2012.09-64/bin/arm-none-linux-gnueabi-g++ from
CodeSourcery
wget
http://www.codesourcery.com/downloads/public/gnu_toolchain/arm-none-linux-gnueab
i/arm-2009q3-67-arm-none-linux-gnueabi.bin
Original issue reported on code.google.com by [email protected] on 14 Feb 2014 at 3:28
The text was updated successfully, but these errors were encountered:
I would suspect this to be an endianness problem.
Rapidjson tries to detect the endianness of the target processor via the
'__BYTE_ORDER__' macro usually provided by GCC compilers and falls back to
little endian by default. Little endian would be wrong for m68k.
Does it help to compile with '-DRAPIDJSON_ENDIAN=RAPIDJSON_BIGENDIAN'?
Original issue reported on code.google.com by
[email protected]
on 14 Feb 2014 at 3:28The text was updated successfully, but these errors were encountered: