Permalink
Commits on May 16, 2014
  1. Add check for console on USB serial port but USB CDC not enabled.

    Before this, you could put the console on USB CDC without BUILD_USB_CDC
    and eLua compiled OK but nothing worked. This change makes it spit out
    an appropriate message if that should happen again.
    martinwguy committed May 16, 2014
  2. Fix Mizar32 default IP from 193.168.1.10 to 192.168.1.10

    A typo in the new build system config files set IP to 193.* with gateway
    192.* which can never work.
    martinwguy committed May 16, 2014
Commits on Aug 7, 2013
  1. Update status docs for Mizar32

    - Add CPUs for all three models 128, 256 and 512
    - Mizar32 generic modules pwm, net, adc and i2s are OK
    - Atmel have moved their product pages (der!)
    - Add platform modules mizar32.rtc and .lcd
    - Fix 1 typo ("suported")
    martinwguy committed Aug 7, 2013
Commits on May 15, 2013
  1. Allow BUILD_SHELL without BUILD_TERM

    The only thing the shell uses from "term" is its getchar()
    substitute, which ends up in platform_uart_getchar() on every
    platform except i386. So if TERM is present, use its getchar()
    redirector, and if it isn't, use platform_uart() directly.
    martinwguy committed May 15, 2013
  2. Mizar32: Make inclusion of term.*() Lua module depend on BUILD_TERM

    Just a config dependency change so that undefining BUILD_TERM
    automatically disables the "term" module.
    martinwguy committed May 15, 2013
Commits on May 7, 2013
  1. Make table of available RAM regions static

    Instead of constructing them on the stack at runtime in every call to
    platform_get_{first,last}_free_ram().
    When there was is only one RAM region this makes no difference, as the
    whole thing is optimised out. However, when there are more than one
    region, this improves both size and speed, especially in the simple
    allocator, which calls these functions twice each at every call to
    malloc().
    martinwguy committed May 7, 2013
  2. Add 2 missing lines of the EGC patch

    These two lines are in the Emergency Garbage Collector patches but
    seem to have got lost in transit.
    The case it handles (exceeding MEMLIMIT) is pretty rare.
    martinwguy committed May 7, 2013
  3. Fix compiler warning for type of luai_ipow()

    The Lua VM's luai_ipow() function is reused in lmathlib to provide
    an integer version of the pow() function. However luai_ipow's
    declaration in luac is only for LUA_CORE, whereas lmathlib.c is LUA_LIB.
    The least invasive fix is just to redeclare it in lmathlib.c
    martinwguy committed May 7, 2013
Commits on May 3, 2013
  1. Make inclusion of elua.shell() conditional on BUILD_SHELL

    Compilation failed if te elua Lua module was included but
    BIULD_SHELL was not defined. This fixes that case.
    martinwguy committed May 3, 2013
Commits on Jul 18, 2012
  1. Revert "Fixed the configuration file in order to work with the web

    builder"
    
    This reverts commit fc57957 which was
    meant to be applied to the web-builder branch but ended up in the master
    branch by mistake.
    See fc57957#commitcomment-1552828
    martinwguy committed Jul 18, 2012
Commits on Jun 27, 2012
Commits on Mar 25, 2012
  1. Added documentation file for mizar32 rtc module

    Forgot to git-add it in the previous commit. Oops.
    martinwguy committed Mar 25, 2012
Commits on Mar 19, 2012
  1. New mizar32.rtc platform module

    Methods: mizar32.rtc.get() returns a table like Lua's os.date()
    and os.time() with fields year, monthm day, wday, hour min, sec
    and mizar32.rtc.set() takes a similar table, only changing the
    fields that are present in the table.
    Works with DS1337 and PCF8563 clock chips.
    martinwguy committed Mar 19, 2012
  2. Refactor AVR32 I2C code to have I2C packet-level send() and recv() ro…

    …utines
    
    This introduces i2c_send() and i2c_recv in the AVR32 code that send/receive
    whole I2C messages from start to optional stop.
    martinwguy committed Mar 19, 2012
  3. Bug fix: always return 0 from Lua functions

    Many mizar32.lcd() Lua functions used to tail-call the i2c_send_command()
    functions, whereas they should explicitly return 0, the number of return
    values from the Lua function. OK, i2c_send_command did return 0 but this
    will change in future when it can detect slave presence and collisions.
    martinwguy committed Mar 19, 2012
Commits on Mar 15, 2012
  1. Fix typo in docs

    martinwguy committed Mar 15, 2012
Commits on Mar 8, 2012
  1. Document pio.decode()

    martinwguy committed Mar 8, 2012
  2. Fix typos in PIO refman

    martinwguy committed Mar 8, 2012
  3. AVR32: In pio.decode(), reverse the mapping of hardware pins to PX names

    On AVR32UC3A0 parts, the GPIO pins are named PA0-31, PB0-31, PC0-5 and
    PX0-39. There is no port X: these pins map to five backwards ranges of
    bits in the third and fourth sets of GPIO registers (where PC0-5 are
    the first six of the third register set).
    Already we map pio.PX_nn names to these values, and this commit puts the
    reverse mapping into place in pio.decode().
    
    Test program to verify correct mapping:
    
    function eval(s)
      return( loadstring( "return(" .. s .. ")" ) )()
    end
    
    for i=0,39 do
      name = "pio.PX_" .. tostring(i)
      gpio = eval(name)
      print( name, gpio, pio.decode(gpio) )
    end
    martinwguy committed Mar 8, 2012
Commits on Feb 26, 2012
  1. Save 4 bytes RAM per structure by reordering struct members

    Structure size is 12 byte instead of 16 with GCC on x86,
    probably also on others.
    martinwguy committed Feb 26, 2012
Commits on Feb 19, 2012
  1. Build system changes to allow building with UIP_CONF_IPV6

    These changes allow you to "#define UIP_CONF_IPV6 1" in uip-conf.h
    for an IPV6-capable network layer.
    This also removes a pointless inclusion in avr32/uip-conf.h
    The changes to the other three .c files (from "build.h" to "platform_conf.h")
    are just orthogonal future-proofing.
    martinwguy committed Feb 19, 2012
  2. Restore original licence on uip-conf.h

    Luminary Micros replaced the original permissive Swedish Institute
    of Computer Science licence with their own one restricting it to
    use on LM devices only. This put the original license back.
    See http://uip-stack.cvs.sourceforge.net/viewvc/uip-stack/uip/unix/uip-conf.h
    martinwguy committed Feb 19, 2012
  3. Fix indentation

    martinwguy committed Feb 19, 2012
  4. AVR32: Defer SPI clock setup to when platform_spi_setup() is called

    This change defers enabling the SPI clocks to platform_spi_setup()
    so that, if SPI ports are not used and BUILD_MMCFS is disabled,
    power consumption is reduced.
    martinwguy committed Feb 19, 2012
Commits on Feb 18, 2012
  1. Remove uart.SYS_TIMER and net.SYS_TIMER (use tmr.SYS_TIMER)

    This change removes the extra undocumented uart.SYS_TIMER and
    net.SYS_TIMER constants, which are equal to tmr.SYS_TIMER.
    The documentation says to use tmr.SYS_TIMER and in the rare case
    of uart or net being compiled in but not tmr, the system timer
    can be had by using nil or omitting the parameter.
    martinwguy committed Feb 18, 2012
Commits on Feb 7, 2012
  1. Another fix in the CRLF handler: don't drop the second one of repeated

    newline characters.
    
    The console used to drop the second one of repeated \r or \n characters
    because it would stash the second one in std_prev_char, then at the start
    of the next call to std_read(), would poke the \r into the start of the
    line buffer, returning a line that began with \r or \n.
    This change processes the lookahead character the same as regular ones.
    martinwguy committed Feb 7, 2012
  2. Echo the lookahead character on console input

    Previously, when pasting multiple lines into the console, the first
    character of half the lines would not be echoed.  This was due to it being
    slurped up by the CRLF lookahead detector, but not being echoed when it was
    regurgitated. This change fixes that.
    martinwguy committed Feb 7, 2012
Commits on Feb 5, 2012
  1. Add missing constant uart.FLOW_NONE when optram==0

    and reorder the optram=0 constants to match the optram>0 ones so that
    it is more obvious to the eye whether they correspond or not.
    martinwguy committed Feb 5, 2012
Commits on Feb 1, 2012
  1. Fix removal of UART buffer with uart.set_buffer(id, 0)

    Previously, if you removed a buffer from e uart, the buffer was
    removed but the interrupt routine was left intalled, which made
    the interpreter hang if you typed a character on the serial port.
    Now you can enable and disable UART buffers.
    
    This also changes the order of interrupt handler to
    - install the handler
    - enable the interrupt
    instead of the other way round, so there is no window of time with the
    interrupt enabled but no handler installed.
    martinwguy committed Feb 1, 2012