Post Reply 
DB48X: HP48-like RPL implementation for DM42
11-17-2024, 06:20 PM
Post: #451
RE: DB48X: HP48-like RPL implementation for DM42
(11-17-2024 02:43 PM)raprism Wrote:  
(11-17-2024 02:14 AM)c3d Wrote:  Should be fixed on dev now.

I read that a new release will take place today. Nevertheless for people interested to compile snapshots on Linux the attached zsh script might be of help:

- checks if DM42 has activated USB Disk
- script toggles available to disable simulator builds and/or test DMCP building w/o transfers to DM42
- uses specific 10.3 arm-none-eabi version (newer compiler versions on my system give errors on DM42 with local variables programs ..., see issue #1286 on Github)
- resetting locally changed versioned file related to CRC

I still have to perform git reset --hard after builds to be able to pull new versions. This could be due to inconsistent line endings.

There are 3 lines specifically for zsh usage. If you use the simpler version, then e.g. bash can be also used.

Thanks. Here are a few things I would change to your script:

You need to run the build twice only if the CRC fails, so I would rewrite:

Code:

# perform make and ignoring error
make OPT=$OPT CC=$CC CXX=$CXX AS=$AS OBJCOPY=$OBJCOPY AR=$AR SIZE=$SIZE || :
# 2x for CRC
make OPT=$OPT CC=$CC CXX=$CXX AS=$AS OBJCOPY=$OBJCOPY AR=$AR SIZE=$SIZE

as

Code:

# perform make and ignoring error (2x if CRC computation fails)
make OPT=$OPT CC=$CC CXX=$CXX AS=$AS OBJCOPY=$OBJCOPY AR=$AR SIZE=$SIZE || \
make OPT=$OPT CC=$CC CXX=$CXX AS=$AS OBJCOPY=$OBJCOPY AR=$AR SIZE=$SIZE

There is already an install procedure, all you need is to provide the mount point. I would use it instead of that part of your script, because it will stay up to date as new files are added to the distribution. So I would replace:

Code:

cp db48x.pgm ${DMCP_RELDIR}/db48x_qspi.bin ${MNTDIR} & progress -mp $!

for d in {${MNTDIR},${BINDIR}}; do
  # before all directory names on DM42 were changed to lower case
  mkdir -p ${d}/help ${d}/state
  cp help/db48x.md help/*.bmp ${d}/help & progress -mp $!
  cp -r help/img ${d}/help & progress -mp $!
  #
  # # simpler version (works also for bash)
  # cp -r config/* ${d}/config & progress -mp $!
  # # zsh variant
  # # DO NOT OVERWRITE keymap.cfg
  setopt extendedglob
  cp -r config/^keymap.cfg* ${d}/config & progress -mp $!
  unsetopt extendedglob
  #
  cp -r library ${d} & progress -mp $!
  cp state/Demo.48S ${d}/state & progress -mp $!
done # for

with something like:

Code:

make install MOUNTPOINT="$MNTDIR" EJECT="udisksctl unmount -b ${BLKDEV}"

For dm32, replace install with dm32-install.

DB48X,HP,me
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
DB48X v0.4.8 is out - c3d - 10-22-2023, 11:31 PM
Release v0.5.0: Statistics and flags - c3d - 11-20-2023, 08:57 AM
v0.6.5: Minor bug fixes - c3d - 02-11-2024, 11:23 PM
Release 0.7.1 "Whip" - Bug fixes - c3d - 03-04-2024, 12:46 AM
DB48X v0.7.4 release is out - c3d - 04-14-2024, 03:05 PM
DB48X v0.7.6: Solving menu - c3d - 05-13-2024, 12:04 AM
DB48X v0.7.7: Units in solver - c3d - 06-02-2024, 11:36 PM
v0.7.10 - Interactive stack - c3d - 07-14-2024, 11:31 PM
DB48X v0.7.13 is out - c3d - 08-05-2024, 07:31 AM
DB48X v0.7.15 - c3d - 08-25-2024, 08:45 PM
DB48X v0.7.16 - c3d - 09-02-2024, 01:36 AM
DOSUBS command - grbrum - 09-04-2024, 03:37 PM
v0.7.18 - APPLY, SUBST, WHERE - c3d - 09-15-2024, 11:58 PM
Program Editing Question - spiff72 - 09-16-2024, 03:27 PM
press 2 simultaneous buttons? - grbrum - 09-30-2024, 09:01 PM
CST Custom Menu - grbrum - 10-04-2024, 05:00 AM
v0.8.2: Assignments, Custom menu - c3d - 10-21-2024, 05:49 AM
CST - grbrum - 11-05-2024, 08:07 PM
Stuttgart video - c3d - 11-07-2024, 08:22 PM
Long Name Menus - usability - grbrum - 11-08-2024, 07:47 PM
Release v0.8.5: Keyboard fixes - c3d - 11-12-2024, 01:05 AM
RE: DB48X: HP48-like RPL implementation for DM42 - c3d - 11-17-2024 06:20 PM
CONVERT bug - grbrum - 11-12-2024, 07:44 PM
Christmas wishlist is open - c3d - 12-02-2024, 07:09 PM
DB48X/50X CATALOG 'behaviour' - n1msr - 12-03-2024, 10:24 AM
DB48x v0.8.8 - Power usage reduction - c3d - 12-08-2024, 11:40 PM



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