Martin Guy
c0119c0908
Revert "Allow enabling/disabling of console buffer bu changing only BUF_ENABLE_CON"
...
This reverts commit a836ebeaaee9b3a84096f6f72213fa4a9d9f725a.
As requested by Bogdan
2011-04-25 13:52:10 +02:00
Martin Guy
0a89dae26b
Revert "Remove printing of internal code values from "Buffer overflow" message"
...
This reverts commit 593b4b92327622b62f262d3c333e93d914d4ff72.
As requested by Bogdan
2011-04-23 19:15:17 +02:00
Martin Guy
f49b44eae6
Fix typos in en_refman_gen_tmr doc
2011-04-23 18:56:41 +02:00
Martin Guy
593b4b9232
Remove printing of internal code values from "Buffer overflow" message
...
so that the relatively common UART input buffer overflow condition just says
"[ERROR] Buffer overflow." without the inscrutable "resid=0 resnum=0" numbers.
2011-04-23 18:20:15 +02:00
Martin Guy
a836ebeaae
Allow enabling/disabling of console buffer bu changing only BUF_ENABLE_CON
...
(before, you had to change BUF_ENABLE_CON and CON_BUF_SIZE in parallel).
2011-04-23 18:05:50 +02:00
Martin Guy
3b17c33002
When there is an error reading a line of input, return the actual number of
...
characters received before the error (not a whole buffer full of junk!)
2011-04-23 18:03:51 +02:00
Martin Guy
35c0b09875
When the UART gets a receive error, clear the error flag to avoid infinite
...
repetition of the error state.
2011-04-23 18:02:47 +02:00
Martin Guy
b49a11f4a2
Fix typos in documentation
2011-04-21 20:48:04 +02:00
Martin Guy
eed1f7492d
Prepare Mizar32 platform conf for support of ADC module (disabled by default)
2011-04-21 19:34:09 +02:00
Martin Guy
5cb0a63bee
Fix defines so that inclusion of ADC code is controlled by BUILD_ADC
...
(previously, if NUM_ADC>0 but !BUILD_ADC, compilation failed with
unresolved symbols)
2011-04-21 19:09:19 +02:00
Martin Guy
ae73382af2
Omit AVR32 UART pin definitions for UARTS 3 and 4 when NUM_UART <= 2
...
(which is the usual case)
2011-04-13 13:16:04 +02:00
Martin Guy
3b77200eda
EVK1100 has two UARTS, not four. USARTs 2 and 3 are used for SPI, and calling
...
uart.setup() on them can crash the board.
2011-04-13 13:06:53 +02:00
Martin Guy
d5b8f534ae
Avoid compiler warning about adc_int_handler() when NUM_ADC == 0
2011-04-13 12:06:19 +02:00
Martin Guy
0c0fe83457
Revert "Avoid compiler warning about adc_int_handler() when NUM_ADC == 0"
...
This reverts commit d0eae8c43349e422a306d8b51fd10c531d359964.
2011-04-13 12:04:38 +02:00
Martin Guy
d0eae8c433
Avoid compiler warning about adc_int_handler() when NUM_ADC == 0
2011-04-13 12:01:51 +02:00
Martin Guy
2873ac892a
Comment rationale behind Mizar32 pull-up resistor code on UART0 RX pin
...
and make it happen before the UART (interrupt) is initialized.
2011-04-13 11:56:00 +02:00
Martin Guy
a0cda92c75
Fix typos in pio refman doc
2011-04-13 11:38:26 +02:00
Martin Guy
d6042df51f
Fix two typos in refman_gen_cpu doc
2011-04-13 11:34:31 +02:00
Martin Guy
873c731568
Fix typo in i2c doc: u23 -> u32
2011-04-13 09:32:05 +02:00
Martin Guy
d55aa8cf10
Add minimal documentation at the head of build_elua.lua
...
saying how to install dependencies and where to find out the
command-line flags
2011-04-12 17:05:08 +02:00
Martin Guy
1fd500623e
Make build-elua.lua also a directly executable script (#! ...)
2011-04-12 16:34:42 +02:00
Martin Guy
28c2c86847
Fix typos in I2C documentation
2011-04-12 16:23:25 +02:00
Martin Guy
fe4c8d86f7
Integrated Martin Guy's emBLOD bootloader patch in eLua. Original patch message:
...
emBLOD is Marcus Jansson's second-stage boot loader for AVR32UC3A
parts as used in the EVK1100 and Mizar32 boards, designed to allow
firmware images larger than the on-chip flash memory by loading the
eLua binary from SD card into SDRAM and executing it there.
The source for the emBLOD loader is here https://github.com/cmp1084/emBLOD
When compilation option bootloader=emblod is given to scons, a special
version is compiled that
- locates the program at the start of SDRAM
- doesn't initialize the system clocks and SDRAM controller, as these
are already set up by emBLOD.
If the bootloader= option is not given, eLua is compiled exactly as before.
The changes I've made to Marcus' originally posted patches are to put
DATA and BSS in internal static RAM, the same as before, since in the
best case (memcpy) the SDRAM is three times slower than access to
static RAM
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=80657
This also has an impact on code speed: the interpreter runs 9 times
slower in external SDRAM than it does in internal flash.
Tested and working on Mizar32
2011-04-07 22:35:10 +03:00
Bogdan Marinescu
091b5d31e9
Lua build system improvements and bug fixes
...
- specify -Dmacro on the builder command line to automatically include the macro in the compiler command line
- refactoring: option handling code now moved to utils/utils.lua
- various small bugfixes
2011-04-07 17:38:10 +03:00
Martin Guy
01bcb32034
Apply Roberto's security and bug fixes to Lua 5.1.4 updating it to 5.1.4-3
...
See http://www.lua.org/ftp/patch-lua-5.1.4-3
2011-04-06 19:31:39 +02:00
Martin Guy
6a46c6d425
Fix pio.port.getval() on AVR32 and AT91SAM7X platforms.
...
See http://tracker.eluaproject.net/issues/188 for details
2011-04-06 19:00:42 +02:00
Martin Guy
044ca8cadd
The AVR32 timer setup code is pointlessly complex, defining two structures
...
identical to the ones in the avr32 headers, then copying the bitfields one
by one. This commit just uses the avr32 bitfields and writes them to the
regiters as 32-bit words. Code saving: 240 bytes (and it's faster of course)
2011-04-06 18:55:30 +02:00
Martin Guy
c7a698ff5e
Merge branch 'master' of github.com:elua/elua
2011-04-06 18:07:31 +02:00
Martin Guy
7ae5518bf9
First version of AVR32 PWM driver and module for Mizar32 and EVK1100.
2011-04-06 18:04:16 +02:00
Martin Guy
c99a357f91
Fix typo in PWM refman
2011-04-05 18:11:31 +02:00
James Snyder
e1b64e77d9
github supports asciidoc markup, replace readme, add a bit more from overview page
2011-04-04 18:02:01 -05:00
Martin Guy
7fed22f40e
Regularize indentation to two spaces and strip trailing spaces from lines
...
in src/platform/avr32/platform.c
2011-04-03 16:57:27 +02:00
Martin Guy
1acf8b88af
:Integer mathlib for eLua
...
------------------------
This adds the functions of mathlib that make sense when numbers are integers:
functions [abs,max,min,random,randomseed,sqrt] and constant "huge"
so that idioms like this (from p.195 of Programming in Lua) also work:
for i = 1,math.huge do
...
if ... then break end
...
end
The square root gives the integer square root of positive numbers
(which would be floor(sqrt(f)) in a floating point world).
2011-03-30 12:48:24 +02:00
Martin Guy
ec73001dca
Reduce default stack size on AVR32 from 8192 to 4096.
...
The figure is verified by instrumenting the C stack and parsing a large (50KB)
Lua program, whose high-water-mark is 3948 bytes.
2011-03-28 06:41:15 +02:00
Martin Guy
60eb74f3cd
Fix compiler warning about unused variable
2011-03-23 03:52:15 +01:00
Martin Guy
9d5d30ca45
Allow compilation when _FS_READONLY == 1 in src/fatfs/ffconf.h
2011-03-20 02:57:53 +01:00
Martin Guy
68be85c008
Allow compilation when _USE_LFN = 0 or _CODE_PAGE = 1 (in src/fatfs/ffconf.h)
2011-03-20 02:10:44 +01:00
Martin Guy
13b84a2ca0
Reformat long lines (>2k!) to 80 columns
2011-03-20 01:56:28 +01:00
James Snyder
7e6189d2c1
minor adc and avr32 cleanup
2011-03-18 17:40:53 -05:00
James Snyder
fdbdbcc335
Implement basic ADC module for AVR32 (only tested on EVK1100), add crosstools-ng avr32 toolchain to lua-based build system.
...
- add basic (no clock support) ADC implementation for AVR32, works on EVK1100
- add avr32-unknown-none-gcc to new lua-based build system to support crosstools-ng avr32 toolchain
2011-03-18 15:20:27 -05:00
James Snyder
5aa2558cc3
Merge branch 'master' of https://github.com/elua/elua
2011-03-17 14:59:39 -05:00
James Snyder
bf17fc216f
Don't automatically compile functions we're not using in FatFs for mmcfs. Won't reduce code size for most platforms since we garbage collect when we link, but we don't need to compile these anyways.
2011-03-17 14:57:58 -05:00
Martin Guy
2d14535e76
Fix comment to reflect reality
2011-03-16 00:55:04 +01:00
Martin Guy
a4af4ea2b2
Revert "Decrease AVR32 stack size from 8192 to 2048, the same as the other small"
...
With 2048, the Lua parser dies on "life.lua".
This reverts commit 9a3abb6b1025814875a73753a11ceb1401f67d82.
2011-03-15 22:12:30 +01:00
Martin Guy
70a2dd4d04
Merge branch 'master' of github.com:elua/elua
2011-03-15 05:37:13 +01:00
Martin Guy
cf9c3bd3d1
Do use the internal SRAM for the start of the heap (and then the SDRAM)
...
because this makes small program (up to 16KB heap) run about twice as fast.
2011-03-15 05:18:27 +01:00
Martin Guy
efbe36d4ed
Fix variable name in commentary
2011-03-15 05:16:42 +01:00
Martin Guy
9a3abb6b10
Decrease AVR32 stack size from 8192 to 2048, the same as the other small
...
platforms. In brief testing, it still seems to work down to 256 bytes
2011-03-15 05:15:14 +01:00
James Snyder
3e1248ebc6
Fix to allow STM32 PWM frequencies to go below 1100 Hz
2011-03-14 17:02:15 -05:00
Martin Guy
957dab161d
Fix spello in toolchain doc: "reffer"->"refer"
2011-03-14 05:27:20 +01:00