Post Reply 
Wp34s - How to compile realbuild flash bin?
04-16-2023, 10:43 AM (This post was last modified: 04-16-2023 03:29 PM by lamaflieger.)
Post: #1
Wp34s - How to compile realbuild flash bin?
Hello,

i want to make some minor changes on the Wp34s relating the units-conversion.
i am on a Win10 System.
Is there a manual/description what i need to compile the WP34s bin?

Best regards
Christoph
Find all posts by this user
Quote this message in a reply
04-17-2023, 10:16 AM
Post: #2
RE: Wp34s - How to compile realbuild flash bin?
Here's some instructions for compiling under Windows 7 that I wrote back in 2012 (!)
Building the WP-34s firmware on a computer running 64-bit Windows 7
This may still work - I tend to use Linux now for compiling.

Incidentally, these instructions are as old as the laptop that I am still using today - I'm rather proud of this!

Nigel (UK)
Find all posts by this user
Quote this message in a reply
04-18-2023, 01:10 AM
Post: #3
RE: Wp34s - How to compile realbuild flash bin?
(04-17-2023 10:16 AM)Nigel (UK) Wrote:  This may still work - I tend to use Linux now for compiling.

And this may be a good idea as Windows 10 offers the WSL, a fully integrated Linux subsystem.
I find it easier when I need an Unix environnement than to use Mingw or Cygwin like I did in the past.
Find all posts by this user
Quote this message in a reply
04-18-2023, 03:48 PM
Post: #4
RE: Wp34s - How to compile realbuild flash bin?
Thanks for your help.

It tried to compile on the Win10 with this error:
Maybe someone has an idea? If not i will try it on linux.

flash-build.log:


Code:
arm-none-eabi-gcc.exe (GCC) 4.6.0
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mingw32-gcc -Wall -O1 -g -DHOSTBUILD=1 -m32 -DREALBUILD=1 -o windows32_realbuild/genchars7.exe genchars7.c
windows32_realbuild/genchars7.exe >charset7.h
42 undefined characters of 121 total
mingw32-gcc -Wall -O1 -g -DHOSTBUILD=1 -m32 -DREALBUILD=1 -o windows32_realbuild/genfont.exe genfont.c
windows32_realbuild/genfont.exe
mingw32-gcc -Wall -O1 -g -DHOSTBUILD=1 -m32 -DREALBUILD=1 -IdecNumber -DNEED_D64FROMSTRING=1 -DNEED_D128FROMSTRING=1 -o windows32_realbuild/compile_consts.exe compile_consts.c decNumber/decNumber.c decNumber/decContext.c decNumber/decimal64.c decNumber/decimal128.c
cd windows32_realbuild \
        && ./compile_consts.exe "../" "../windows32_realbuild/obj/" \
        && mingw32-make "CFLAGS=-mthumb -mcpu=arm7tdmi -Os -fira-region=one -Wall -g -fno-common -fno-exceptions  -DREALBUILD=1 -Dat91sam7l128=1 -Iatmel -DNO_BACKUP_INIT=1 -DNO_RAM_COPY=1 -I../.." -j2 -C consts
mingw32-make[1]: Entering directory `c:/Users/tuppen/Desktop/Code/trunk/windows32_realbuild/consts'
arm-none-eabi-ar q ../../windows32_realbuild/obj/libconsts.a const_NaN.o const_inf.o const__inf.o const__3.o const__2.o const__1.o const__0.o const_0.o const_1.o const_2.o const_3.o const_4.o const_5.o const_6.o const_7.o const_8.o const_9.o const_10.o const_15.o const_16.o const_20.o const_21.o const_32.o const_45.o const_50.o const_60.o const_90.o const_100.o const_150.o const_180.o const_200.o const_256.o const_300.o const_360.o const_400.o const_500.o const_9000.o const_36000.o const_100000.o const_1e_32.o const_1e_37.o const_1e_10000.o const_1e_24.o const_1e_14.o const_hms_threshold.o const_0_0001.o const_0_001.o const_0_1.o const_0_0195.o const_0_2.o const_0_2214.o const_0_25.o const_0_04.o const_0_05.o const_0_4.o const_0_5.o const__0_5.o const_0_6.o const_0_665.o const_0_75.o const_0_85.o const_0_9.o const_0_97.o const_0_995.o const_2on3.o const_5on6.o const_1on60.o const_1_3.o const_1_5.o const_1_7.o const_9on5.o const_2_326.o const_root2on2.o const_e.o const_PI.o const_2PI.o const_sqrt2PI.o const_recipsqrt2PI.o const_PIon2.o const_PIon180.o const_PIon200.o const_ln2.o const_ln10.o const_phi.o const_egamma.o const__1onPI.o const_2pow64.o const_randfac.o const_gammaR.o const_gammaC00.o const_gammaC01.o const_gammaC02.o const_gammaC03.o const_gammaC04.o const_gammaC05.o const_gammaC06.o const_gammaC07.o const_gammaC08.o const_gammaC09.o const_gammaC10.o const_gammaC11.o const_gammaC12.o const_gammaC13.o const_gammaC14.o const_gammaC15.o const_gammaC16.o const_gammaC17.o const_gammaC18.o const_gammaC19.o const_gammaC20.o const_gammaC21.o
arm-none-eabi-ar: creating ../../windows32_realbuild/obj/libconsts.a
arm-none-eabi-ranlib ../../windows32_realbuild/obj/libconsts.a
mingw32-make[1]: Leaving directory `c:/Users/tuppen/Desktop/Code/trunk/windows32_realbuild/consts'
mingw32-gcc -Wall -O1 -g -DHOSTBUILD=1 -m32 -DREALBUILD=1 -o windows32_realbuild/lcdgen.exe lcdgen.c
windows32_realbuild/lcdgen.exe >lcdmap.h
mingw32-make[1]: Entering directory `C:/Users/tuppen/Desktop/Code/trunk/decNumber'
mingw32-make[1]: Nothing to be done for `all'.
mingw32-make[1]: Leaving directory `C:/Users/tuppen/Desktop/Code/trunk/decNumber'
mingw32-gcc -Wall -O1 -g -DHOSTBUILD=1 -m32 -DREALBUILD=1 -o windows32_realbuild/post_process.exe post_process.c
mingw32-gcc -Wall -O1 -g -DHOSTBUILD=1 -m32 -DREALBUILD=1 -o windows32_realbuild/create_revision.exe create_revision.c
rm -f windows32_realbuild/compile_cats.exe catalogues.h xrom.c
mingw32-make HOSTCC=mingw32-gcc REALBUILD=1 DISABLE_XTAL= XTAL= INFRARED= catalogues.h xrom.c
mingw32-make[1]: Entering directory `C:/Users/tuppen/Desktop/Code/trunk'
mingw32-gcc -Wall -O1 -g -DHOSTBUILD=1 -m32 -DREALBUILD=1 -IdecNumber -o windows32_realbuild/compile_cats.exe compile_cats.c
windows32_realbuild/compile_cats.exe >catalogues.h 2>tools/wp34s.op
mingw32-gcc -E -P -x c -Ixrom -DCOMPILE_XROM=1 xrom.wp34s > xrom_pre.wp34s
tools/wp34s_asm.pl -pp -op tools/wp34s.op -c -o xrom.c xrom_pre.wp34s
// WARNING: Unrecognized O/S (msys). Some features may not work as expected.
// WP 34S assembly preprocessor enabled: '-pp'
// Opcode map source: tools/wp34s.op (specified)
// Opcode SVN version: -- unknown --
// Running WP 34S preprocessor from: C:/Users/tuppen/Desktop/Code/trunk/tools/wp34s_pp.pl
mingw32-make[1]: Leaving directory `C:/Users/tuppen/Desktop/Code/trunk'
windows32_realbuild/create_revision.exe >revision.h
'git' is not recognized as an internal or external command,
operable program or batch file.
Unable to read git revision from temporary output file: No error
    Executing 'svnversion -n >s8t8.'
    No revision number obtained from subversion (invalid)
    Executing 'git svn find-rev `git rev-parse master` >s8t8.1'
    Revision number will be 0

arm-none-eabi-gcc -mthumb -mcpu=arm7tdmi -Os -fira-region=one -Wall -g -fno-common -fno-exceptions  -DREALBUILD=1 -Dat91sam7l128=1 -Iatmel -DNO_BACKUP_INIT=1 -DNO_RAM_COPY=1 -IdecNumber -o realbuild/calc -nostartfiles  -T wp34s.lds -Wl,--gc-sections,-Map=realbuild/mapfile.txt \
        atmel/board_cstartup.S asone.c -nostdlib -lgcc -Lwindows32_realbuild/obj -lconsts -fwhole-program -ldecNum34s # -save-temps
C:\Users\tuppen\AppData\Local\Temp\ccANLfVt.o: In function `cmd_off':
C:\Users\tuppen\Desktop\Code\trunk/xeq.c:251: undefined reference to `shutdown_calc'
collect2: ld returned 1 exit status
make: *** [realbuild/calc.bin] Error 1
Find all posts by this user
Quote this message in a reply
04-19-2023, 07:37 PM
Post: #5
RE: Wp34s - How to compile realbuild flash bin?
Looking at the WP34S source code (r3914) I see that the function shutdown_calc doesn't seem to be defined anywhere, although shutdown is. Looking at this Sourceforge page I see that some functions, including shutdown, were renamed in release 3912; perhaps this hasn't been completed?
My recommendation: change all occurrences of shutdown_calc to shutdown. Since you don't appear to be using iOS this shouldn't cause any further problems, and it may fix the existing one.

Nigel (UK)
Find all posts by this user
Quote this message in a reply
06-03-2023, 03:07 PM
Post: #6
RE: Wp34s - How to compile realbuild flash bin?
lamaflieger Wrote:It tried to compile on the Win10 with this error:
Maybe someone has an idea?

I see an error saying it cannot find 'Git'. Git is a revision control system. Presumably, one of your makefiles is set up to pull any updates down from a public repository to your local drive, so that you're always building off of something like a "latest stable version" branch.

If you have a complete set of source code and you don't want to fool around with Git, you'll have to strip that part out from your makefile(s) so it just builds what you have there.

Daily drivers: 15c, 32sII, 35s, 41cx, 48g, WP 34s/31s. Favorite: 16c.
Latest: 15ce, 48s, 50g. Gateway drug: 28s found in yard sale ~2009.
Find all posts by this user
Quote this message in a reply
06-03-2023, 10:22 PM
Post: #7
RE: Wp34s - How to compile realbuild flash bin?
The bit using git is extracting the version number of the source code to include in the final image. It's not critical but is useful.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)