Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port gui to Qt4, several fixes to the msp430 platform exspecially the chronos watch. #1

Closed
wants to merge 60 commits into from

Conversation

davidgraeff
Copy link

I already wrote to the mailing list but no response so far.
I've ported the gui layer from sdl/windows/xlib to Qt4 and applied several fixes for the msp430 chronos platform.
I synced to the lastest svn version, too.

Regards,
David

davidgraeff added 30 commits June 14, 2013 10:38
…nother thread, because Qt4 have to run in the main thread
…nstead of disabling realtime (works in some/most cases)
…is a keyword in c++; Do not print the keys for the ez430chronos ui, we have buttons in the qt4 gui with tooltips.
… the provided watchdog implemenation, add support for it
…missing defines for DIGIIO_NEW_OFFSETS devices
…newer (4.6+) gcc versions. RRCM, RRAM, RLAM, RRUM shift instructions are still missing for a working msp430x support with gcc4.6
…are 16bit; redefine register addresses, this will work on a CC430f6137, do other msp430 have other addresses?
davidgraeff added 26 commits July 7, 2013 23:43
…eccessary condition checks. Add theme icons to menu
…; Save/Restore geometry of mainwindow; Fix: Init buttonDown/Up to 0. Fix: Init image buffer to 0
… on newer compilers like gcc4.6+ because the .nodata section will be overriden
Every newer distribution provides packages. Solaris is obsolete. We use Qt4 instead of SDL now.
@afrab
Copy link
Owner

afrab commented Sep 4, 2013

Hi David,

I am sorry for the delay, I have been quite busy these last days, I'll
have a look at the pull request and get back to you as soon as possible.

I will check with the users we have if QT4 is available but WSim is used
in several places where the SDL/X11 backends are the prefered ones. I'll
try to check if moving to QT4 only is ok.

Anyway, all modifications you made seem really great !
Thank you very much for your pull request, I'll merge asap.

Best regards,
Antoine

On lun. 19 août 2013 18:59:37 CEST, notifications@github.com wrote:

I already wrote to the mailing list but no response so far.
I've ported the gui layer from sdl/windows/xlib to Qt4 and applied several fixes for the msp430 chronos platform.
I synced to the lastest svn version, too.

Regards,
David
You can merge this Pull Request by running:

git pull https://github.com/davidgraeff/WSim master

Or you can view, comment on it, or merge it online at:

#1

-- Commit Summary --

  • UI: Remove sdl,win,x11 backend. Add Qt4 backend. Move simulation to another thread, because Qt4 have to run in the main thread
  • Just print out a warning for --realtime if used together with wsnet instead of disabling realtime (works in some/most cases)
  • liblogpkt: Make the lib c++ compatible
  • ez430chronos: Use machine.device.deleteFnt instead of delete. Delete is a keyword in c++; Do not print the keys for the ez430chronos ui, we have buttons in the qt4 gui with tooltips.
  • Use deleteFnt instead of delete. Delete is a keyword in c++
  • Add CMake support for libselect
  • Add c++ makro AC_PROG_CXX to automake toolchain for gui support
  • Add qt4 to automake toolchain for gui support, remove all other types
  • gitignore: Add Makefiles and some other automake files
  • msp430: add reset reason register, basic implementation: reason is always none
  • msp430: code compiled for the chronos watch from TI did not work with the provided watchdog implemenation, add support for it
  • msp430, timer: do not print a not implemented message if TAxEX0 is set to 0
  • msp430, digiIO: indentation for pin defines, add missing defines
  • msp430, lcd/lcdb: add missing registers, more detailed error output. lcd clear works now
  • msp430, model definitions: add indentation for a better reading, add missing defines for DIGIIO_NEW_OFFSETS devices
  • msp430: add missing include for reset reason register
  • GUI: refactor/split ui.cpp into multiple files
  • msp430: Add pushm/popm instructions for msp430x architecture used by newer (4.6+) gcc versions. RRCM, RRAM, RLAM, RRUM shift instructions are still missing for a working msp430x support with gcc4.6
  • msp430, timer: improve error message
  • msp430, adc12: add adc12a/adc12plus support
  • msp430, adc12: add adc12a/adc12plus support, add author for contact
  • msp430: add shared reference dummy module
  • msp430, adc: styling, add error output if sample is requested for non existing channel
  • msp430, adc12: fix adc get input sample call
  • msp430, digiIO: correctly register port j
  • msp430, sfr: add usci support for new sfr offset registers
  • msp430, models: add usci addresses+shared reference etc to CC430f6137. Correct sysrstiv base address.
  • msp430,portmap: only output one error for a dummy module
  • msp430,sysrstiv: improve support. Still mainly a dummy module for now.
  • msp430,uscia: add msp430_io_register_range16, because some registers are 16bit; redefine register addresses, this will work on a CC430f6137, do other msp430 have other addresses?
  • msp430, digiIO: remove debug out
  • gui: port to Qt with moc and uic usage
  • gui: port to Qt with moc and uic usage; remove moc file
  • GUI: Add Qt intermediate files to gitignore
  • Add QtCreator user file to gitignore
  • Use const char* for moptions struct
  • Gui: Avoid linker error by including config.h in gui cpp files
  • Gui: Avoid linker error by not including unused files in gui cpp files
  • Add c++ support to configure.ac
  • Fix remaining compiler warnings, add extern 'c' to some header files to be usable by the c++ gui part
  • GUI: Add thread synchronisation mutex; Only update gui every 50ms instead with every redraw request.
  • Update git repository to latest svn changes as of revision 827
  • cc1100 fixes
  • Gui: Fix problems with new buttons for every simulation start
  • Gui: Split mainwindow into mainwindow and simulationthread. Add quit event for gui
  • Re-add msp430 watchdog file
  • Gui: Use another QImage construction, avoid setPixel. Remove some unneccessary condition checks. Add theme icons to menu
  • Gui: Add about dialog, draw 'no simulation running' text if appropriate
  • Make build process more silent
  • GUI: Only use update timer and update pixmap if it changed
  • Configure.ac: Add -rdynamic flag to debug flags to get method names in backtraces
  • ez430 lcd: Do not show dimmed elements with low contrast color
  • GUI: Add application/domain name for QApplication (used by QSettings); Save/Restore geometry of mainwindow; Fix: Init buttonDown/Up to 0. Fix: Init image buffer to 0
  • Elf loading: Disable MSP430_DATA_INIT_WORKAROUND. This actually harms on newer compilers like gcc4.6+ because the .nodata section will be overriden
  • Remove Solaris + MSP430 Crosscompile sections + No SDL, Qt4
  • Enable MSP430_DATA_INIT_WORKAROUND, but consider .rodata Sektion.
  • Add gui readme. Remove unnessary old gui file.
  • libelf: more generic workaround for gcc/msp430 elf file loading
  • revert enabling realtime if wsnet is active
  • enabling realtime as default (~20% cpu instead 100%)

-- File Changes --

M .gitignore (43)
M INSTALL (45)
M arch/common/hardware.h (11)
M arch/common/mcu.h (10)
M arch/msp430/Makefile.am (2)
M arch/msp430/msp430.c (28)
M arch/msp430/msp430.h (13)
M arch/msp430/msp430_adc.c (59)
M arch/msp430/msp430_adc12.c (23)
M arch/msp430/msp430_alu.c (97)
M arch/msp430/msp430_alu.h (2)
M arch/msp430/msp430_debug.c (6)
M arch/msp430/msp430_digiIO.c (262)
M arch/msp430/msp430_digiIO.h (2)
M arch/msp430/msp430_intr.c (4)
M arch/msp430/msp430_lcd.c (2)
M arch/msp430/msp430_lcdb.c (129)
M arch/msp430/msp430_lcdb.h (18)
M arch/msp430/msp430_models.h (1254)
M arch/msp430/msp430_portmap.c (12)
M arch/msp430/msp430_sfr.h (935)
A arch/msp430/msp430_shared_reference.c (46)
A arch/msp430/msp430_shared_reference.h (15)
A arch/msp430/msp430_sysrstiv.c (102)
A arch/msp430/msp430_sysrstiv.h (19)
M arch/msp430/msp430_timer.c (6)
M arch/msp430/msp430_uscia.c (99)
M arch/msp430/msp430_uscia.h (91)
M arch/msp430/msp430_uscib.c (93)
M arch/msp430/msp430_uscib.h (90)
M arch/msp430/msp430_watchdog.c (149)
M arch/msp430/msp430_watchdog.h (93)
M configure.ac (104)
M devices/7seg/7seg_dev.c (2)
M devices/at45db/at45db_dev.c (6)
M devices/bargraph/bargraph_dev.c (2)
M devices/cc1100_2500/Makefile.am (5)
M devices/cc1100_2500/cc1100_2500_dev.c (15)
M devices/cc1100_2500/cc1100_2500_gdo.c (24)
M devices/cc1100_2500/cc1100_2500_globals.h (5)
M devices/cc1100_2500/cc1100_2500_internals.h (3)
M devices/cc1100_2500/cc1100_2500_registers.c (6)
M devices/cc1100_2500/cc1100_2500_state.c (10)
A devices/cc1100_2500/cc1101mm_dev.c (903)
A devices/cc1100_2500/cc1101mm_dev.h (237)
M devices/cc2420/cc2420_dev.c (2)
M devices/cma3000_spi/cma3000_spi_dev.c (7)
M devices/devices.c (2)
M devices/devices_fd.h (2)
M devices/ds1722/ds1722_dev.c (2)
M devices/ds2411/ds2411_dev.c (2)
M devices/ez430_lcd/ez430_lcd_dev.c (2)
M devices/ez430_lcd/ez430_lcd_img.c (6)
M devices/gdm1602a/gdm_dev.c (2)
M devices/hd44780/hd44780_dev.c (2)
M devices/led/led_dev.c (2)
M devices/m25p80/m25p80_dev.c (6)
M devices/ptty/ptty_dev.c (6)
M devices/scp1000_i2c/scp1000_i2c_dev.c (9)
M devices/spidev/spidev_dev.c (2)
M devices/spidev_dsp/spidev_dsp_dev.c (2)
M devices/spidev_master/spidev_master_dev.c (2)
M devices/uigfx/uigfx_dev.c (2)
M libelf/libelf_ntv.c (50)
M libgui/Makefile.am (37)
A libgui/README.md (81)
A libgui/gui_defines.h (43)
A libgui/libgui.pro (16)
A libgui/main.cpp (10)
A libgui/mainwindow.cpp (233)
A libgui/mainwindow.h (78)
A libgui/mainwindow.ui (99)
D libgui/none/none_bkend.c (97)
A libgui/qt_main.cpp (27)
D libgui/sdl/sdl_bkend.c (368)
A libgui/simulationthread.cpp (93)
A libgui/simulationthread.h (62)
D libgui/ui.c (271)
A libgui/ui.cpp (135)
M libgui/ui.h (109)
D libgui/ui_bkend.h (23)
D libgui/win/win_bkend.c (359)
D libgui/x11/x11_bkend.c (354)
M liblogger/logger.c (6)
M liblogger/logger.h (4)
M liblogpkt/logpkt.h (2)
A libselect/CMakeLists.txt (21)
M libselect/libselect.c (8)
M libselect/libselect.h (2)
M libselect/libselect_socket.c (2)
M libselect/libselect_socket.h (2)
M platforms/ez430chronos/Makefile.am (4)
M platforms/ez430chronos/ez430chronos.c (52)
M src/Makefile.am (2)
M src/main.c (375)
A src/mainworker.c (384)
A src/mainworker.h (22)
M src/mgetopt.h (6)
M src/options.c (13)

-- Patch Links --

https://github.com/afrab/WSim/pull/1.patch
https://github.com/afrab/WSim/pull/1.diff

@davidgraeff
Copy link
Author

Hi Antoine,

thanks for considering those changes and and no need to excuse
for beeing busy :) I'm afraid in the current form the pull request is
quite difficult
to review, at least it is not possible to cherry pick single commits.

For an easier review it is probably neccessary to rewrite the commit history
(squash and split commits). I'd like to do that before you start
reviewing :)

Some changes are related to the git-svn sync. Would you please sync the
github repository
to the subversion one, so that I can rebase the patch set and remove
those duplicate changes? :)

May it be an option for you guys to drop svn? Although choise is always
good, I'm
not sure if this applies to repositories, too. And plattforms like github
make it much more easier to collaborate and send patches.

Choosing Qt4 for the gui has some implications like using a c++ compiler
for libgui
and the need to run the simulation in a background thread instead of the
main thread.
But in the end, in my opinion, maintainance would be easier by only
having one toolkit/backend instead of three
(think about the wayland display server that may supersede the xserver
and one
of the current backends would have to be rewritten etc).

Best regards,
Antoine

Am 04.09.2013 21:54, schrieb Antoine Fraboulet:

Hi David,

I am sorry for the delay, I have been quite busy these last days, I'll
have a look at the pull request and get back to you as soon as possible.

I will check with the users we have if QT4 is available but WSim is used
in several places where the SDL/X11 backends are the prefered ones. I'll
try to check if moving to QT4 only is ok.

Anyway, all modifications you made seem really great !
Thank you very much for your pull request, I'll merge asap.

Best regards,
Antoine

On lun. 19 août 2013 18:59:37 CEST, notifications@github.com wrote:

I already wrote to the mailing list but no response so far.
I've ported the gui layer from sdl/windows/xlib to Qt4 and
applied several fixes for the msp430 chronos platform.
I synced to the lastest svn version, too.

Regards,
David
You can merge this Pull Request by running:

git pull https://github.com/davidgraeff/WSim master

Or you can view, comment on it, or merge it online at:

#1

-- Commit Summary --

  • UI: Remove sdl,win,x11 backend. Add Qt4 backend. Move simulation
    to another thread, because Qt4 have to run in the main thread
  • Just print out a warning for --realtime if used together with
    wsnet instead of disabling realtime (works in some/most cases)
  • liblogpkt: Make the lib c++ compatible
  • ez430chronos: Use machine.device.deleteFnt instead of delete.
    Delete is a keyword in c++; Do not print the keys for the ez430chronos
    ui, we have buttons in the qt4 gui with tooltips.
  • Use deleteFnt instead of delete. Delete is a keyword in c++
  • Add CMake support for libselect
  • Add c++ makro AC_PROG_CXX to automake toolchain for gui support
  • Add qt4 to automake toolchain for gui support, remove all other types
  • gitignore: Add Makefiles and some other automake files
  • msp430: add reset reason register, basic implementation: reason is
    always none
  • msp430: code compiled for the chronos watch from TI did not work
    with the provided watchdog implemenation, add support for it
  • msp430, timer: do not print a not implemented message if TAxEX0 is
    set to 0
  • msp430, digiIO: indentation for pin defines, add missing defines
  • msp430, lcd/lcdb: add missing registers, more detailed error
    output. lcd clear works now
  • msp430, model definitions: add indentation for a better reading,
    add missing defines for DIGIIO_NEW_OFFSETS devices
  • msp430: add missing include for reset reason register
  • GUI: refactor/split ui.cpp into multiple files
  • msp430: Add pushm/popm instructions for msp430x architecture used
    by newer (4.6+) gcc versions. RRCM, RRAM, RLAM, RRUM shift
    instructions are still missing for a working msp430x support with gcc4.6
  • msp430, timer: improve error message
  • msp430, adc12: add adc12a/adc12plus support
  • msp430, adc12: add adc12a/adc12plus support, add author for contact
  • msp430: add shared reference dummy module
  • msp430, adc: styling, add error output if sample is requested for
    non existing channel
  • msp430, adc12: fix adc get input sample call
  • msp430, digiIO: correctly register port j
  • msp430, sfr: add usci support for new sfr offset registers
  • msp430, models: add usci addresses+shared reference etc to
    CC430f6137. Correct sysrstiv base address.
  • msp430,portmap: only output one error for a dummy module
  • msp430,sysrstiv: improve support. Still mainly a dummy module for now.
  • msp430,uscia: add msp430_io_register_range16, because some
    registers are 16bit; redefine register addresses, this will work on a
    CC430f6137, do other msp430 have other addresses?
  • msp430, digiIO: remove debug out
  • gui: port to Qt with moc and uic usage
  • gui: port to Qt with moc and uic usage; remove moc file
  • GUI: Add Qt intermediate files to gitignore
  • Add QtCreator user file to gitignore
  • Use const char* for moptions struct
  • Gui: Avoid linker error by including config.h in gui cpp files
  • Gui: Avoid linker error by not including unused files in gui cpp files
  • Add c++ support to configure.ac
  • Fix remaining compiler warnings, add extern 'c' to some
    header files to be usable by the c++ gui part
  • GUI: Add thread synchronisation mutex; Only update gui every 50ms
    instead with every redraw request.
  • Update git repository to latest svn changes as of revision 827
  • cc1100 fixes
  • Gui: Fix problems with new buttons for every simulation start
  • Gui: Split mainwindow into mainwindow and simulationthread. Add
    quit event for gui
  • Re-add msp430 watchdog file
  • Gui: Use another QImage construction, avoid setPixel. Remove some
    unneccessary condition checks. Add theme icons to menu
  • Gui: Add about dialog, draw 'no simulation running' text
    if appropriate
  • Make build process more silent
  • GUI: Only use update timer and update pixmap if it changed
  • Configure.ac: Add -rdynamic flag to debug flags to get method
    names in backtraces
  • ez430 lcd: Do not show dimmed elements with low contrast color
  • GUI: Add application/domain name for QApplication (used by
    QSettings); Save/Restore geometry of mainwindow; Fix: Init
    buttonDown/Up to 0. Fix: Init image buffer to 0
  • Elf loading: Disable MSP430_DATA_INIT_WORKAROUND. This actually
    harms on newer compilers like gcc4.6+ because the .nodata section will
    be overriden
  • Remove Solaris + MSP430 Crosscompile sections + No SDL, Qt4
  • Enable MSP430_DATA_INIT_WORKAROUND, but consider .rodata Sektion.
  • Add gui readme. Remove unnessary old gui file.
  • libelf: more generic workaround for gcc/msp430 elf file loading
  • revert enabling realtime if wsnet is active
  • enabling realtime as default (~20% cpu instead 100%)

-- File Changes --

M .gitignore (43)
M INSTALL (45)
M arch/common/hardware.h (11)
M arch/common/mcu.h (10)
M arch/msp430/Makefile.am (2)
M arch/msp430/msp430.c (28)
M arch/msp430/msp430.h (13)
M arch/msp430/msp430_adc.c (59)
M arch/msp430/msp430_adc12.c (23)
M arch/msp430/msp430_alu.c (97)
M arch/msp430/msp430_alu.h (2)
M arch/msp430/msp430_debug.c (6)
M arch/msp430/msp430_digiIO.c (262)
M arch/msp430/msp430_digiIO.h (2)
M arch/msp430/msp430_intr.c (4)
M arch/msp430/msp430_lcd.c (2)
M arch/msp430/msp430_lcdb.c (129)
M arch/msp430/msp430_lcdb.h (18)
M arch/msp430/msp430_models.h (1254)
M arch/msp430/msp430_portmap.c (12)
M arch/msp430/msp430_sfr.h (935)
A arch/msp430/msp430_shared_reference.c (46)
A arch/msp430/msp430_shared_reference.h (15)
A arch/msp430/msp430_sysrstiv.c (102)
A arch/msp430/msp430_sysrstiv.h (19)
M arch/msp430/msp430_timer.c (6)
M arch/msp430/msp430_uscia.c (99)
M arch/msp430/msp430_uscia.h (91)
M arch/msp430/msp430_uscib.c (93)
M arch/msp430/msp430_uscib.h (90)
M arch/msp430/msp430_watchdog.c (149)
M arch/msp430/msp430_watchdog.h (93)
M configure.ac (104)
M devices/7seg/7seg_dev.c (2)
M devices/at45db/at45db_dev.c (6)
M devices/bargraph/bargraph_dev.c (2)
M devices/cc1100_2500/Makefile.am (5)
M devices/cc1100_2500/cc1100_2500_dev.c (15)
M devices/cc1100_2500/cc1100_2500_gdo.c (24)
M devices/cc1100_2500/cc1100_2500_globals.h (5)
M devices/cc1100_2500/cc1100_2500_internals.h (3)
M devices/cc1100_2500/cc1100_2500_registers.c (6)
M devices/cc1100_2500/cc1100_2500_state.c (10)
A devices/cc1100_2500/cc1101mm_dev.c (903)
A devices/cc1100_2500/cc1101mm_dev.h (237)
M devices/cc2420/cc2420_dev.c (2)
M devices/cma3000_spi/cma3000_spi_dev.c (7)
M devices/devices.c (2)
M devices/devices_fd.h (2)
M devices/ds1722/ds1722_dev.c (2)
M devices/ds2411/ds2411_dev.c (2)
M devices/ez430_lcd/ez430_lcd_dev.c (2)
M devices/ez430_lcd/ez430_lcd_img.c (6)
M devices/gdm1602a/gdm_dev.c (2)
M devices/hd44780/hd44780_dev.c (2)
M devices/led/led_dev.c (2)
M devices/m25p80/m25p80_dev.c (6)
M devices/ptty/ptty_dev.c (6)
M devices/scp1000_i2c/scp1000_i2c_dev.c (9)
M devices/spidev/spidev_dev.c (2)
M devices/spidev_dsp/spidev_dsp_dev.c (2)
M devices/spidev_master/spidev_master_dev.c (2)
M devices/uigfx/uigfx_dev.c (2)
M libelf/libelf_ntv.c (50)
M libgui/Makefile.am (37)
A libgui/README.md (81)
A libgui/gui_defines.h (43)
A libgui/libgui.pro (16)
A libgui/main.cpp (10)
A libgui/mainwindow.cpp (233)
A libgui/mainwindow.h (78)
A libgui/mainwindow.ui (99)
D libgui/none/none_bkend.c (97)
A libgui/qt_main.cpp (27)
D libgui/sdl/sdl_bkend.c (368)
A libgui/simulationthread.cpp (93)
A libgui/simulationthread.h (62)
D libgui/ui.c (271)
A libgui/ui.cpp (135)
M libgui/ui.h (109)
D libgui/ui_bkend.h (23)
D libgui/win/win_bkend.c (359)
D libgui/x11/x11_bkend.c (354)
M liblogger/logger.c (6)
M liblogger/logger.h (4)
M liblogpkt/logpkt.h (2)
A libselect/CMakeLists.txt (21)
M libselect/libselect.c (8)
M libselect/libselect.h (2)
M libselect/libselect_socket.c (2)
M libselect/libselect_socket.h (2)
M platforms/ez430chronos/Makefile.am (4)
M platforms/ez430chronos/ez430chronos.c (52)
M src/Makefile.am (2)
M src/main.c (375)
A src/mainworker.c (384)
A src/mainworker.h (22)
M src/mgetopt.h (6)
M src/options.c (13)

-- Patch Links --

https://github.com/afrab/WSim/pull/1.patch
https://github.com/afrab/WSim/pull/1.diff


Reply to this email directly or view it on GitHub
#1 (comment).

@davidgraeff
Copy link
Author

I'll close this one now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants