_APP.s19 built incorrectly on macOS?

Topics for the Eclipse Environment
Post Reply
rbr_scoleman
Posts: 4
Joined: Mon May 01, 2017 2:41 pm

_APP.s19 built incorrectly on macOS?

Post by rbr_scoleman »

I'm developing for the SBL2e using NBEclipse and NNDK 2.8.3 on macOS. When I build my project, the .s19 file produced seems reasonable:

Code: Select all

$ head sbl2e-acc.bpr.s19
S014000073626C32652D6163632E6270722E73313942
S315FFC04010207C20007FFCB1FC0000000067022E4818
S315FFC040204E56FFF841F92000040045F9FFC18CE068
...
but the _APP.s19 file is a binary blob:

Code: Select all

$ xxd sbl2e-acc.bpr_APP.s19 | head
00000000: bbbb bbbb 0000 0000 ffc0 4000 0000 0000  ..........@.....
00000010: ffc0 4010 0000 0000 0001 5670 0000 0000  ..@.......Vp....
00000020: b67b c4f9 c035 e134 f46d 4f31 3eca 1ecb  .{...5.4.mO1>...
which isn't handled correctly by AutoUpdate on either Windows or macOS. What's gone wrong with my build chain? I can replicate the problem with a brand new project so I don't think it's anything to do with my project configuration. Did I miss installing something?
rbr_scoleman
Posts: 4
Joined: Mon May 01, 2017 2:41 pm

Re: _APP.s19 built incorrectly on macOS?

Post by rbr_scoleman »

Looks like the packcode binary on macOS is just a symlink to bpackcode which produces a binary output file, not an S-record as on Windows. I've made a POSIX-safe port of the real packcode; see the change history of that Gist for details.
rbr_scoleman
Posts: 4
Joined: Mon May 01, 2017 2:41 pm

Re: _APP.s19 built incorrectly on macOS?

Post by rbr_scoleman »

Spoke too soon:

Code: Select all

Application record checksum fail
That's what the debug port tells me after AutoUpdating or FLAshing any new builds, including self-built copies of the dualserial firmware. (I can flash the stock dualserial_APP.s19 OK so I don't think there's a problem with the way I'm feeding the firmware into the board.) Clearly I wasn't supposed to have to make changes to packcode myself, so how is one supposed to use the NNDK on macOS? It really feels like the macOS package is there to tick a box and not because anybody at NetBurner actually uses it and cares about it.
rbr_scoleman
Posts: 4
Joined: Mon May 01, 2017 2:41 pm

Re: _APP.s19 built incorrectly on macOS?

Post by rbr_scoleman »

(Cross-posted from support ticket #35547.)

I'm really sorry, I made a big mistake trying to diagnose this issue: I didn't do a full uninstall/reinstall. I'd forgotten that the packcode symlink was one I made back in December when first trying to figure this issue out before getting distracted by other things.

So, to restate the problem: there is no packcode binary provided in an out-of-box install of the NNDK tools on macOS:

Code: Select all

$ ls -l /Applications/NetBurner/pcbin
total 424
-rwxr-xr-x  1 scoleman  admin   18068  6 Apr  2016 MIME_magic.txt
-rwxr-xr-x  1 scoleman  admin   14048  6 Apr  2016 bpackcode
-rwxr-xr-x  1 scoleman  admin   60668 26 Apr  2016 compcode
-rwxr-xr-x  1 scoleman  admin    9008 26 Apr  2016 compfile
-rwxr-xr-x  1 scoleman  admin  100764 26 Apr  2016 comphtml
-rwxr-xr-x  1 scoleman  admin      31  6 Apr  2016 placeholder
$ find /Applications/NetBurner -type f -name packcode
$
And even the example projects are unbuildable:

Code: Select all

$ cd /Applications/NetBurner/examples/SBL2E/dualserial/
$ make
...
m68k-elf-objcopy -Wl,--gc-sections --strip-all --output-target=srec ./dualserial.elf /Applications/NetBurner/bin/dualserial.s19
packcode /Applications/NetBurner/bin/dualserial.s19 /Applications/NetBurner/bin/dualserial_APP.s19 -R 0xffc04000 0xFFC3C000 -PSBL2E
make: packcode: No such file or directory
make: *** [/Applications/NetBurner/bin/dualserial_APP.s19] Error 1
Hopefully that makes a little more sense. Is there any other diagnostic information I can give?
Post Reply