WP34s Development under Linux?



#2

Hi, all.

I'm trying to modify WP34 based on V2.2 using Linux enviorment.

Q1. If based on V2.2 firmware, which SVN revision shoud be checked out?

I tried to build with CodeSourcery G++ Lite(4.5.2) on Linux and
build SVN1782 source. Download the firmware to HP30b hardware.
Almost of commands work correct, but [h][CONST] is hanged up.

Anyone has seen that?

Q2. Which compiler should be used on linux?
Q3. Who tests the firmware with linux compiler?

regards,


#3

Quote:
Which compiler should be used on linux

I was told that there were problems using CodeSourcery.

Quote:
Who tests the firmware with linux compiler?

You! :-)

#4

Quote:
Q1. If based on V2.2 firmware, which SVN revision shoud be checked out?

Build 1797 was a good v2.2 build IIRC. Generally, just read the comments submitted with each build - and a few of the following ones - and you'll get a feeling what was (and is) going on. But be aware you branch on work in progress! We let you follow the development process closely, giving you a lot of insight and OTOH a lot of responsibility for your deeds. If you want a probably more stable package, take the latest zipped build.

For the other questions, I concur with Eric.

#5

As Eric already told you, CodeSourcery and WP 34S are a close mismatch. :-(

If you really want to participate in development, do it on the latest SVN revision. Pascal is just adding a Qt GUI to the project which makes it possible to run the GUI version on MacOS, Linux and whatever operating system supports Qt. Compiling this on a Linux system should be easy. In order to build the ARM binary, get a generic GCC 4.6.2 ARM cross compiler. Yagarto.de is supplying one for Windows and MacOS which I'm running both with success: They produce the same binaries.


#6

The project compiles under Linux indeed. But it is better to use GCC.

I second Marcus: you should base your work on the last version. If you checkout it, you'll find a README in the QtGui subdirectory explaining how to build the whole project and the new emulator under Linux.

Then you can indeed build the calc.bin if you have a compiler. Just configure the paths in the main Makefile (search for CROSS_COMPILE) and launch "make REALBUILD=1".

If you really want to work on 2.2, it must be possible to merge the old source code with the emulator and the changes in the Makefile but you'll be on your own.


#7

Thanks All!

I will uninstall CodeSourcery and try YAGARTO on windows or generic GCC on linux.

I only want to add sum functions to every day using stable calculator.
So if V3.0 overlay is released, I will change the base revision from V2.2 to trunk.
V3.0 is very interesting such as Qt emulator, new functions(including solver) and bug fix.
I'm hoping and waiting new overlay.


#8

Quote:
I only want to add sum functions to every day using stable calculator.

Are you sure this is a missing functionality? There are functions for time and date and calculations therewith.

#9

I want to add 'SETJPN' and money exchange rate convertor.

OK,OK! I will follow trunk, but now building GCC toolchain.


#10

What should SETJPN do?

  • Radix indicator (dot or comma) ?
  • Time (12 or 24 hour) ?
  • Thousands separate present or not ?
  • Julian/Gregorian change over date (1582 or 1752) ?
  • Date format (d.my, m.dy or y.md) ?

I think adding this command will consume 10 - 12 bytes of flash.

If you want to do it yourself, you'll need to make changes to (at least):

  • xeq.c
  • xeq.h
  • commands.c
  • compile_cats.c

- Pauli

Edited: 24 Nov 2011, 10:31 p.m.


#11

So, I am Japanese. Anyone is there?

Quote:
What should SETJPN do?
  • Radix indicator (dot or comma) ?
  • Time (12 or 24 hour) ?
  • Thousands separate present or not ?
  • Julian/Gregorian change over date (1582 or 1752) ?
  • Date format (d.my, m.dy or y.md) ?

Radix indicator is dot.
Time is 24h
Thousands separate present(comma).
J -> G: 1873
Date format is y.md
Quote:
I think adding this command will consume 10 - 12 bytes of flash.

J -> G year is not important for me.

I should try that. But if you do that, it is very welcome.
I'm building tool chain now.


#12

Quote:
J -> G year is not important for me.

Good, we only allow two choices :-) The history of the changeover is bizarre to say the least.


A SETJPN command is now present.

We errantly thought that the Chinese settings were suitable in Japan too :-( Live and learn.


- Pauli


#13

Quote:
Good, we only allow two choices :-) The history of the changeover is bizarre to say the least.

A SETJPN command is now present.

We errantly thought that the Chinese settings were suitable in Japan too :-( Live and learn.


Thanks!
WP34s is open source, so the user liveing that country can add and modify.

#14

I can't build rev 1924.
Some modify is needed.

--- decn.h      (revision 1924)
+++ decn.h (working copy)
@@ -252,6 +252,7 @@
extern decNumber *decNumberPolyLnAlpha(decNumber *r, const decNumber *z, const decNumber *y, const decNumber *x);
extern decNumber *decNumberPolyHEn(decNumber *res, const decNumber *y, const decNumber *x);
extern decNumber *decNumberPolyHn(decNumber *res, const decNumber *y, const decNumber *x);
+extern decNumber *decNumberPolyCommon(decNumber *res, const decNumber *y, const decNumber *x);

extern decNumber *decNumberBernBn(decNumber *res, const decNumber *n);
extern decNumber *decNumberBernBnS(decNumber *res, const decNumber *n);


#15

Nobby, Pauli has made some changes to the code in this area. What is the exact error message the compiler produces?


#16

Sorry. I mistake.
I had refered old revision.

#17

Quote:
I think adding this command will consume 10 - 12 bytes of flash.

If we want to add some personalization in the firmware without consuming flash, it is relatively easy: we can simply change a value in calc.bin itself.

I've tried this to calibrate the STOPWATCH function and it works perfectly. My WP34s are now very accurate without a quartz.

I plan on implementing this kind of function, starting by calibration, in the new emulator.
Editing a bitfield to select a few options from an already compiled calc.bin should be very easy too.

#18

Quote:
If you checkout it, you'll find a README in the QtGui subdirectory explaining how to build the whole project and the new emulator under Linux.

Wow good job Pascal!

I'm posting the latest version of the emulator in a public share at work - I know there are a few RPN oriented people at my work.

Any plans to make a "compact" skin?


#19

I've just updated the layout(s) again for Windows. Pascal, some work ahead! :-)

Edited: 25 Nov 2011, 7:00 a.m.

#20

Yes, the new emulator will support the same set of skins. It is just a matter of converting them to the new XML format which can be partially automated.

And the emulator must also be improved to detect the set of skins, create the menu, remember the last one selected...

Nothing major but I'm working on the .dat files load&save right now.

Anyway, a first "full" version of the new emulator should be ready in 2 to 4 weeks I guess. Maybe sooner if my real work stop bothering me :-)


#21

Quote:
Nothing major but I'm working on the .dat files load&save right now.

The routines are all there (storage.c). What makes this difficult?

#22

Nothing difficult but if we want the emulator to be a real application, packaged for several OS, it is better to use the .dat files as default values and to store the user's modifications as "preferences", i.e as a copy in its home directory.

It allows the application to be installed for several users (in Program Files, /usr/local, /opt, /Applications...), avoids trying to write to the directory where the application is installed (which can be read-only...)

Supporting the current behavior will still be possible of course.


#23

I understand. You want to look at the current directory (or a preferences directory) first for any file, then in the emulator directory. Writing shall always go to the current or user's directory.


#24

Exactly.

#25

Hi, Pascal.

I try to build QtGui, but can not.
If define INCLUDE_STOPWATCH, compiler reports the following error.

QtEmulatorAdapter.c:66: undefined reference to `KeyCallback'

Sorry, I have few experience in Qt.
I'd like to fix this.

Thank you.


#26

Strange, work fine here.

Can you check that you have the last version and that QtEmulatorAdapter.c has the #include "stopwatch.h" at the beginning ?

Edited: 26 Nov 2011, 10:54 a.m.


#27

Quote:
Strange, work fine here.

Can you check that you have the last version and that QtEmulatorAdapter.c has the #include "stopwatch.h" at the beginning ?


Yes.

% head -n 30 QtEmulatorAdapter.c | tail -n 15

// #include <string.h>
#include "xeq.h"
#include "stopwatch.h"
#include "display.h"
#include "data.h"
#include "storage.h"

extern int is_key_pressed_adapter();
extern int put_key_adapter(int);
extern void add_heartbeat_adapter(int);

void init_calculator()
{
DispMsg = NULL;

Current SVN information is

% LANG=C svn info
Path: .
URL: https://wp34s.svn.sourceforge.net/svnroot/wp34s/trunk/QtGui
Repository Root: https://wp34s.svn.sourceforge.net/svnroot/wp34s
Repository UUID: b7f7c86c-e032-4ad3-b847-6de2c591762e
Revision: 1935
Node Kind: directory
Schedule: normal
Last Changed Author: pmeheut
Last Changed Rev: 1932
Last Changed Date: 2011-11-27 04:50:51 +0900 (Sun, 27 Nov 2011)

The error messages is

g++ -Wl,-O1 -o Linux/QtGui Linux/QtGuiMain.o Linux/QtEmulator.o Linux/QtBackgroundImage.o Linux/QtKey.o Linux/QtSkin.o Linux/QtScreenPainter.o Linux/QtKeyboard.o Linux/QtSerialPort.o Linux/QtScreen.o Linux/QtCalculatorThread.o Linux/QtHeartBeatThread.o Linux/moc_QtEmulator.o Linux/moc_QtBackgroundImage.o  -L../Linux_qt/obj -lCalculator -ldecNum34s -lconsts  -L/usr/lib/qt-4.6.1/lib -LLinux -lAdapter -L../Linux_qt/obj -lCalculator -ldecNum34s -lconsts -lQtXml -lQtGui -lQtCore -lpthread 
Linux/libAdapter.a(QtEmulatorAdapter.o): In function `forward_keycode':
/home/nkon-v51/doc/hpcalc/wp34s/trunk/QtGui/QtEmulatorAdapter.c:67: undefined reference to `KeyCallback'
/home/nkon-v51/doc/hpcalc/wp34s/trunk/QtGui/QtEmulatorAdapter.c:69: undefined reference to `KeyCallback'


#28

Ok, this is a link problem, not a compilation one. And something is wrong on your link command: you are missing both the calculator libraries ( -L../Darwin_qt/obj -lCalculator -ldecNum34s -lconsts) and the Qt libraries.

Are you using the provided Makefile? Because I tried under Ubuntu yesterday and everything went smoothly with gcc & Qt installed, PATH & QMAKESPEC defined. All I had to do was "make".


#29

Quote:
Ok, this is a link problem, not a compilation one. And something is wrong on your link command: you are missing both the calculator libraries ( -L../Darwin_qt/obj -lCalculator -ldecNum34s -lconsts) and the Qt libraries.

Are you using the provided Makefile? Because I tried under Ubuntu yesterday and everything went smoothly with gcc & Qt installed, PATH & QMAKESPEC defined. All I had to do was "make".


QtGui is builded successfully.
The cause is that the linux console emulator and library does not builded correctry. I have only builded the firmware.

Thanks.


#30

Fine. Do not hesitate to report any problem, QtGui is still a work in progress.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Is Linux common among us RPN types? db (martinez, ca.) 46 2,090 12-11-2013, 08:25 PM
Last Post: Paul Guertin
  EMU41; Dosbox on Linux; Excruciatingly sloooow Geir Isene 9 513 12-01-2013, 05:10 PM
Last Post: Geir Isene
  Building WP 34s emulator on Linux Eric Smith 3 228 07-25-2013, 03:03 PM
Last Post: Marcus von Cube, Germany
  trouble flashing wp34s under Linux Glenn Becker 8 418 07-23-2013, 02:21 AM
Last Post: Marcus von Cube, Germany
  Is there a HP50g emulator for Linux? Matti Övermark 2 219 07-03-2013, 07:40 AM
Last Post: Matti Övermark
  wp34s flashing with linux. Thomas Windisch 6 351 05-14-2013, 07:40 PM
Last Post: Harald
  wp34sflashcmd Linux problem Ole Streicher 1 158 05-09-2013, 07:25 AM
Last Post: pascal_meheut
  OT. Linux on a Ti Nspire. Matt Kernal 0 149 11-17-2012, 03:52 PM
Last Post: Matt Kernal
  [WP34S] WP34S firmware on the AT91SAM7L-STK dev kit? jerome ibanes 1 197 10-04-2012, 04:59 PM
Last Post: Paul Dale
  off-topic question about linux photo software db (martinez, ca.) 7 348 07-01-2012, 06:35 PM
Last Post: Jeroen Van Nieuwenhove

Forum Jump: