Jump to content

westfw

Members
  • Content Count

    21
  • Joined

  • Last visited


Reputation Activity

  1. Like
    westfw got a reaction from spirilis in (yet again another boring) question about energia / printf   
    >> I had never heard of fopencookie
    Me either.  avr-libc has "fdev_open" and "fdev_setup_stream" on top of their much more primirive "stdio" library, and I figured that newlib (the libc used on ARM Energia implementations) must have something similar.  Then it was just a matter of finding it :-(
  2. Like
    westfw got a reaction from bluehash in (yet again another boring) question about energia / printf   
    >> I had never heard of fopencookie
    Me either.  avr-libc has "fdev_open" and "fdev_setup_stream" on top of their much more primirive "stdio" library, and I figured that newlib (the libc used on ARM Energia implementations) must have something similar.  Then it was just a matter of finding it :-(
  3. Like
    westfw got a reaction from oPossum in (yet again another boring) question about energia / printf   
    OK.   Now I'm feeling a little embarassed, thinking that stdout was more magical than it actually is.  How about just:
    ssize_t myWrite(void *cookie, const char *buf, size_t n) {   return Serial.write((uint8_t*)buf, n); } cookie_io_functions_t myVectors = { 0, myWrite, 0, 0 }; void setup() {                   Serial.begin(115200);   stdout = fopencookie((void *)0, "w", myVectors);   setlinebuf(stdout);   printf( "This is an fprintf demo\n"); } To me, this seems cleaner and more obvious than the mechanations you'd otherwise have to go through to provide a C _write_r() function that called C++ Wiring core functions...  I don't know whether it has "baggage" brought in my calling fopen()...
  4. Like
    westfw got a reaction from abecedarian in Energia 15 available for download.   
    BTW, Energia 15 worked OK on my Win10 (VM) "machine." (with the install in a \bin directory.)   I'm up to 10041.
  5. Like
    westfw got a reaction from bluehash in Energia 15 available for download.   
    BTW, Energia 15 worked OK on my Win10 (VM) "machine." (with the install in a \bin directory.)   I'm up to 10041.
  6. Like
    westfw got a reaction from spirilis in A new MSP430 coming [MSP432 ARM]   
    There are a couple of videos that showed up, linked together starting here:

  7. Like
    westfw got a reaction from jpnorair in Structured Assembler for the Gnu Assembler   
    Remember this: http://forum.43oh.com/topic/219-adding-structured-control-flow-to-any-assembler/ ?
    It was a set of macros that would add _if, _else, _do, _until and similar constructs to an assembly program.
    It turned out that this didn't work when using the Gnu Assembler :-(
     
    But I think I've managed to implement similar macros that DO work for the gnu assembler.
    They're here:  https://github.com/WestfW/structured_gas
     
    I've tried to do this in a way that will make it easily portable to any of the cpus supported by gas, and
    provided implementations for Atmel AVR (tested!) and TI MSP430 (not so much tested.)
     
    Comments welcome.
     
  8. Like
    westfw got a reaction from bluehash in Structured Assembler for the Gnu Assembler   
    Remember this: http://forum.43oh.com/topic/219-adding-structured-control-flow-to-any-assembler/ ?
    It was a set of macros that would add _if, _else, _do, _until and similar constructs to an assembly program.
    It turned out that this didn't work when using the Gnu Assembler :-(
     
    But I think I've managed to implement similar macros that DO work for the gnu assembler.
    They're here:  https://github.com/WestfW/structured_gas
     
    I've tried to do this in a way that will make it easily portable to any of the cpus supported by gas, and
    provided implementations for Atmel AVR (tested!) and TI MSP430 (not so much tested.)
     
    Comments welcome.
     
  9. Like
    westfw got a reaction from Rickta59 in Structured Assembler for the Gnu Assembler   
    Remember this: http://forum.43oh.com/topic/219-adding-structured-control-flow-to-any-assembler/ ?
    It was a set of macros that would add _if, _else, _do, _until and similar constructs to an assembly program.
    It turned out that this didn't work when using the Gnu Assembler :-(
     
    But I think I've managed to implement similar macros that DO work for the gnu assembler.
    They're here:  https://github.com/WestfW/structured_gas
     
    I've tried to do this in a way that will make it easily portable to any of the cpus supported by gas, and
    provided implementations for Atmel AVR (tested!) and TI MSP430 (not so much tested.)
     
    Comments welcome.
     
  10. Like
    westfw got a reaction from MattTheGeek in EasyMSP 0.8.2 Beta2 Released   
    So how serious are you about this Arduino compatibility layer? What's there now seems awfully scant (for example, the only version of millis() I found was pretty wrong, and millis() is a pretty fundamental Arduino function.)
    (It looks more useful as a collection of handy non-arduino-compatible functions...)
×
×
  • Create New...