Shop OBEX P1 Docs P2 Docs Learn Events
Developing for Prop on an embedded ARM Linux system. — Parallax Forums

Developing for Prop on an embedded ARM Linux system.

Heater.Heater. Posts: 21,230
edited 2011-06-14 07:14 in Propeller 1
What is so special about the following command and response?
# mono  homespun.exe temp.spin
Homespun Spin Compiler 0.31
parsing temp.spin
compiling temp.spin
writing 32768 bytes to temp.eeprom
l# 

Well, nothing really except that for once I am running it on an ARM processor running Debian Linux. Yes the same executable runs an all architectures that have a .NET run time. Seems this one works as well:)

This ARM board is an IGEP from ISEE in Spain and is about the size of a cigarette box. It's similar to a Beagle Board but with more peripherals and an industrial temperature spec.

So here we have a very small Prop development system. Indeed the this board plus Prop for real-time stuff becomes a self hosting embedded system.

Comments

  • icepuckicepuck Posts: 466
    edited 2011-06-13 06:53
  • jazzedjazzed Posts: 11,803
    edited 2011-06-13 07:45
    mono.net fan yet?

    It is very nice that it "just worked". Have you tried uterm?
  • Heater.Heater. Posts: 21,230
    edited 2011-06-13 08:30
    icepuck,

    I have the IGEP V2. No GSM but WFI and Bluetooth instead. Much more RAM and FLASH. http://www.igep.es/index.php?option=com_content&view=article&id=46&Itemid=55

    jazzed,

    What uterm? What would I do with it?
  • jazzedjazzed Posts: 11,803
    edited 2011-06-13 08:36
    Heater. wrote: »
    What uterm? What would I do with it?
    Talk to your propeller?
    I also have a .net uconv program that automatically converts parallax font infected files to normal ascii :)
  • Heater.Heater. Posts: 21,230
    edited 2011-06-13 09:33
    Still not with you. There are a number of things call uterm around.
    If I want to talk to the Prop there is always minicom or gtkterm on the IGEP.
    iconv does a good job of parallax font infection removal:)
  • jazzedjazzed Posts: 11,803
    edited 2011-06-13 09:51
    Heater. wrote: »
    iconv does a good job of parallax font infection removal:)
    Indeed ... when you can remember the syntax and don't mind removing the bad chars afterward.

    I was referring to the uterm command line serial port program that you posted back in the general discussion .net thread. I appreciate your port fix-up. I also appreciate not having to unnecessarily switch windows to some silly GUI thingy during my VI propeller developments.
  • Heater.Heater. Posts: 21,230
    edited 2011-06-13 10:56
    Oh! That uterm. I'd totally forgotten that was called uterm. I'll give it a go when I'm back at the office tomorrow.
  • K2K2 Posts: 693
    edited 2011-06-13 11:48
    Heater: This interests me more than a little. I have wondered many times just how small (I really mean 'low-power') a board could be and still host a flavor of propeller tool (lower case intentional). Wi-Fi and Ethernet would serve no purpose unless they were needed for installation of OS or the like, after which I would look for a way to de-power them.

    The only power source would be photovoltaics. Four hours of charging would need to provide 20 hours of continuous operation. Do you suppose this is practical?
  • icepuckicepuck Posts: 466
    edited 2011-06-13 13:21
    K2 wrote: »
    The only power source would be photovoltaics. Four hours of charging would need to provide 20 hours of continuous operation. Do you suppose this is practical?

    Depends on how many continuos cloudy days you have. Once you figure up the battery size for 20+ hours of operation, tripel it(for the couldy days) then size the solar array to charge the battery in the alotted time.
    -dan
  • Heater.Heater. Posts: 21,230
    edited 2011-06-13 14:36
    K2,
    I have not measured the power consumption of the IGEP board yet but I don't see why it should be worse than an Android phone or tablet which has much the same hardware and runs for quite some time on batteries of course.

    What would you use for a display?

    Soon ISEE will have a similar board with touch screen running Android. Perhaps I should be looking at getting HomeSpun running under mono for Android.
  • K2K2 Posts: 693
    edited 2011-06-13 18:18
    icepuck wrote: »
    Depends on how many continuous cloudy days you have. Once you figure up the battery size for 20+ hours of operation, triple it(for the cloudy days) then size the solar array to charge the battery in the allotted time.

    The 20 hours of operation for four hours of charging was a rough estimate of all the factors you mention. No doubt a large solar installation could keep just about any PC operating for a long time.

    Instead, I was thinking more of a bank of NiMH AA cells connected in a manner to provide whatever supply voltage the board, keyboard, and display required. Ideally, three cells in series, providing a nominal 3.6 V, could be used. Ten such packs could supply perhaps 20 Amp-hours. So if the board, display, and everything else could be kept below 1A average current draw, I'd be in business.

    A buck converter could perhaps be used with a standard 12 V - 14 V solar panel to charge the cells with decent efficiency
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-06-13 18:29
    So here we have a very small Prop development system. Indeed the this board plus Prop for real-time stuff becomes a self hosting embedded system.

    I guess what could be a scenario. Stuck at the airport due to volcanic ash from a volcano in Chile (Australia's airspace is mostly shut down at the moment) and you can pull out your trusty development system and do some coding?

    I guess netbooks are getting cheap enough.

    I was thinking when could you do self hosted development and then remembered that yes we can, because we can compile/run C and Basic and Fortran and Pascal from the CP/M emulation.

    When could it be possible from within the prop itself rather than an emulator on the prop? Might need a word processor. How much of Catalina is written in C? The final spin compiler can't run on the prop. Or maybe it will be possible soon, looking at post #571 on the giant GCC thread with a comment by Ken about Roy Eltham's work.
  • K2K2 Posts: 693
    edited 2011-06-13 20:05
    Heater. wrote: »
    Perhaps I should be looking at getting HomeSpun running under mono for Android.

    I think that's a great idea! Seems like a 10" Android tablet with SD storage and an attachable keyboard would be a slick low-power solution.
  • RossHRossH Posts: 5,519
    edited 2011-06-13 21:25
    Dr_Acula wrote: »
    How much of Catalina is written in C? The final spin compiler can't run on the prop. Or maybe it will be possible soon, looking at post #571 on the giant GCC thread with a comment by Ken about Roy Eltham's work.

    Hi Dr_A,

    The Catalina compiler and all of its support utilities (catbind, payload & blackbox) are written 100% in C. Catalina currently uses Homespun as its SPIN/PASM assembler - which means that Catalina can be run on any platform that supports either .NET or mono. As Heater has admirably just demonstrated, this now includes ARM processors.

    The Parallax tool that Roy is currently porting has too many limitations to be used to compile large-scale LMM programs (e.g. it runs out of symbol space, or doesn't support long enough identifiers). Perhaps Roy intends to fix these issues as he is doing the port, but in the short to medium Catalina will continue to use Homespun. But if Parallax ever offers an "officially sanctioned" open source tool that can be used instead, I will certainly adopt it.

    Ross.
  • Heater.Heater. Posts: 21,230
    edited 2011-06-13 21:52
    Rossh,

    I knew this was going to get out of hand:)

    Now I have to compile Catalina on the IGEP and prove that we can develop for the Prop in C from there.

    Have you ever built Catalina for ARM?

    In theory zpu-gcc should also compile there for Zog but I won't hold by breath. It's hard enough to build that compiler at the best of times.
  • RossHRossH Posts: 5,519
    edited 2011-06-13 22:35
    Heater. wrote: »
    I knew this was going to get out of hand:)
    Of course! :smile:
    Heater. wrote: »
    Have you ever built Catalina for ARM?
    No, but apart from Homespun it's all portable C code, so unless the ARM has funny sizes of int or long or something it should be fine. But rather you than me! :smile:

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-06-13 22:52
    The Catalina compiler and all of its support utilities (catbind, payload & blackbox) are written 100% in C. Catalina currently uses Homespun as its SPIN/PASM assembler - which means that Catalina can be run on any platform that supports either .NET or mono. As Heater has admirably just demonstrated, this now includes ARM processors.

    Is it a silly idea to think of running any of that on the prop itself? Is the limiting thing the homespun compiler? I wonder how much of C could be translated directly to pasm in the same way as propbasic?

    Don't mind me - I'm just rambling on here. When I was a kid I programmed in Basic and my dad programmed in Fortran and we both used to muse about this mysterious programming language called C which could compile itself. I've always liked that idea.

    How much access to secret source code would you need to do this? A "Delphi to C" translator to do the spin/pasm bit?
  • Martin HodgeMartin Hodge Posts: 1,246
    edited 2011-06-13 22:55
    Have you ever built Catalina for ARM?

    I have on a Zipit Z2.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-06-13 23:38
    Martin: Ooooh, maybe I will get my Zipit Z2 doing something worthwhile after all?
  • Heater.Heater. Posts: 21,230
    edited 2011-06-13 23:57
    Ah! the zipit. Mine is sitting here next to me. Has been rather neglected of late.

    RossH,

    I can't check out catalina from sourceforge, always says "Checked out revision 0." and leaves me with an empty catalina-c directory.
  • RossHRossH Posts: 5,519
    edited 2011-06-14 00:08
    Heater. wrote: »
    Ah! the zipit. Mine is sitting here next to me. Has been rather neglected of late.

    RossH,

    I can't check out catalina from sourceforge, always says "Checked out revision 0." and leaves me with an empty catalina-c directory.

    Hi Heater,

    I don't use the SourceForge code repositories - didn't seem much point as I'm the only one working on the code itself. Just download the latest release - all the source code is in there.

    Ross.
  • Heater.Heater. Posts: 21,230
    edited 2011-06-14 00:35
    RossH,

    Yep got that. Damn tar ball splatted itself all over my home directory. That will teach me to not use the -t option first:)

    Cant' build anything as all the directory permissions are wrong.

    What's the best way to build Catalina anyway?
  • RossHRossH Posts: 5,519
    edited 2011-06-14 05:19
    Heater. wrote: »
    RossH,
    Yep got that. Damn tar ball splatted itself all over my home directory. That will teach me to not use the -t option first:)
    Or not to read the instructions first, perhaps? :smile:
    Heater. wrote: »
    Cant' build anything as all the directory permissions are wrong.
    Yes, there's a note about that as well in the reference manual, in the section called "Installation"
    Heater. wrote: »
    What's the best way to build Catalina anyway?
    Well, you could start with the section in the reference manual called "Building Catalina". :lol:

    But seriously, once you get it unpacked (and assuming you put it in /usr/local/lib/catalina) all you really need to do is visit each of the following subdirectories and type "build_all" in each one:
    source/catalina
    source/lcc
    source/lib
    source/srecord
    Ross.
  • Heater.Heater. Posts: 21,230
    edited 2011-06-14 07:14
    RossH,
    root@localhost:/home/linaro# cat /proc/cpuinfo 
    Processor    : ARMv7 Processor rev 2 (v7l)
    BogoMIPS    : 799.29
    Features    : swp half thumb fastmult vfp edsp neon vfpv3 
    CPU implementer    : 0x41
    CPU architecture: 7
    CPU variant    : 0x3
    CPU part    : 0xc08
    CPU revision    : 2
    
    Hardware    : IGEP v2 board
    Revision    : 0020
    Serial        : 0000000000000000
    root@localhost:/home/linaro# catalina -lc hello.c
    Catalina Compiler 3.0
    Homespun Spin Compiler 0.31
    parsing /usr/local/lib/catalina/target/lmm_default.spin
    
    parsing /usr/local/lib/catalina/target/Catalina_Common.spin
    parsing /usr/local/lib/catalina/target/Catalina.spin
    parsing /usr/local/lib/catalina/target/Catalina_LMM.spin
    parsing /usr/local/lib/catalina/target/Catalina_HMI_Plugin_HiRes_Tv.spin
    parsing /usr/local/lib/catalina/target/Catalina_comboKeyboard.spin
    parsing /usr/local/lib/catalina/target/Catalina_comboMouse.spin
    parsing /usr/local/lib/catalina/target/Catalina_mouse.spin
    parsing /usr/local/lib/catalina/target/Catalina_HiRes_TV_Text.spin
    parsing /usr/local/lib/catalina/target/TV_Half_Height.spin
    parsing /usr/local/lib/catalina/target/Catalina_CogCount.spin
    parsing /usr/local/lib/catalina/target/Catalina_CogStore.spin
    compiling lmm_default.spin
    compiling Catalina.spin
    compiling Catalina_LMM.spin
    compiling Catalina_HMI_Plugin_HiRes_Tv.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_comboMouse.spin
    compiling Catalina_mouse.spin
    compiling Catalina_HiRes_TV_Text.spin
    compiling TV_Half_Height.spin
    compiling Catalina_CogCount.spin
    compiling Catalina_CogStore.spin
    compiling Catalina_Common.spin
    writing 24248 bytes to hello.binary
    
    code = 14136 bytes
    cnst = 232 bytes
    init = 156 bytes
    data = 172 bytes
    file = 24248 bytes
    root@localhost:/home/linaro#
    
    :):):):):):):):):):):):)
Sign In or Register to comment.