Commit graph

105 commits

Author SHA1 Message Date
bnewbold 6783e66eb1 added 'unused' attribs and reset default target 2010-09-02 19:23:22 -04:00
bnewbold 800b8ca1c1 board-specifc linker scripts 2010-09-02 17:39:52 -04:00
bnewbold d6a3299168 Various fixes, working with Maple 2010-09-01 00:02:36 -04:00
bnewbold 0ccec95446 Portability fixes
Still not working but fixed a lot of merge errors
2010-08-31 22:05:39 -04:00
bnewbold e03d58f4da Further wirish portability progress
Sort of ugly changes. Compiles but untested.
2010-08-31 17:17:57 -04:00
bnewbold 695f0dc4ba MCU-specific, not BOARD-specific 2010-08-31 15:21:09 -04:00
Marti Bolivar 42fd9fdf2d Toolchain improvements
Updated Makefile to read the directory where libmaple is from the
environment variable LIBMAPLE_PATH, if it exists, defaulting to the
current working directory otherwise.

Updated reset.py to look around in /dev for the Maple serial port,
prompting the user if there appear to be multiple possibilities and
complaining if there aren't any.
2010-08-29 20:29:31 -04:00
bnewbold 12c351d056 inital portability work 2010-08-25 22:57:46 -04:00
bnewbold 0a6a19cf76 MEMORY_TARGET not MAPLE_TARGET 2010-08-25 18:21:51 -04:00
Perry Hung 3aa755870a makefile: fix install target
The makefile 'install' target should upload to whatever the last build
target was, regardless of the environment's value of MAPLE_TARGET.
2010-07-08 22:27:37 -04:00
Perry Hung 0b502bb6d8 Fix ram, flash, jtag targets 2010-07-08 01:06:33 -04:00
bnewbold bb7c1d12f5 added helper targets, more verbose, codeblocks fix 2010-07-07 16:55:32 -04:00
Perry Hung 2c043efb66 make: Modularize makefiles, add dependency tracking, build-type tracking
Major build system rewrite. New and exciting:

1. Proper dependency tracking. All source files including header files
should be properly tracked and recompiled as necessary when they are
changed.

2. Build-type tracking. If the target changes from 'ram' to 'flash,'
for example, the build system will force a rebuild rather than
incorrectly link modules to a different address.

3. New targets:
   The old 'ram,' 'flash,' and 'jtag' targets have been replaced with
the environment variable MAPLE_TARGET, which controls the link address.
Users can either export it to their environment, or pass MAPLE_TARGET on
the command-line. Once this is set, sketches can be compiled with 'make
sketch,' or simply 'make.'

Note: the default is MAPLE_TARGET='flash.'

The target 'install' now automagically uploads the sketch to the board
using the appropriate method.

The 'run' target has been renamed to 'debug.' It starts an openocd gdb
server.

4. Odds and ends:
  -Verbose and 'quiet' modes. Set V=1 for verbose compilation, the default
   is quiet.
  -Object file sizes and disassembly information is generated and placed
   in build/$(BOARD).sizes and build/$(BOARD).disas, respectively.
  -Parallel make with -j should speed things up if you have multiple
   cores.
2010-06-25 21:23:04 -04:00
bnewbold d7d3dfe1a9 info cleanup 2010-06-18 22:00:35 -04:00
bnewbold 97cde2028e exuberant ctags target 2010-06-09 12:27:15 -04:00
Perry Hung 88d4b095e4 Preliminary wirish USBSerial implementation.
-updated examples
-removed HardwareUSB
-cleaned up a handful of includes
2010-06-04 00:43:21 -04:00
Perry Hung 6434610803 Moved reset script to support directory
For kicks.
2010-05-28 05:24:21 -04:00
Perry Hung 5b9c5d9c93 libcs3 refactor merge
Removed dependency on libcs3.a because Codesourcery does not provide the
source for it.

We now link against a modified libcs3-lanchon-stm32.a built from parts
in public domain from Lanchon, and a start_c.c from Codesourcery that is
licensed under a permissive license.

Also removed all of the extra linker cruft from the stm32conf directory.

The linker files now live in support/ld
The openocd scripts now live in support/openocd
The udev rules and copy-to-ide scripts now live in support/scripts
The source lives in support/ld/libcs3-lanchon-stm32.tar.gz
2010-05-28 03:06:03 -04:00
bnewbold cf068bc0ac [for AJ] added new HardwareUsb implementation. hack. 2010-05-27 23:37:48 -04:00
bnewbold c99212c5de cleaned up commit process 2010-05-26 23:29:20 -04:00
AJM 4197727c10 minor mods to adjust the driver number and the vendor product id's (serial port now 1eaf:0004) and fixed a bug in reset.py,
added a no-delay usb serial loop to main.cpp as an example. has no problem at 115200 in minicom!
2010-05-21 20:02:22 -04:00
AJM d44f856baf Finalized the libmaple changes required by newboot. Added setupUSB() to wirish init
this involved some some changes to copy-to-ide, WProgram.h, and the makefile. Separated the reset.py from the wait.py so that the program closes the serial port correctly.
2010-05-21 19:09:35 -04:00
AJM 7ee6a800d9 removed another depricated reference to old usb shit
removed HardwareUsb usb in example main, as that class hasnt been defined yet
also modded the makefile to actually compile main.cpp
2010-05-20 23:47:29 -04:00
AJM ceffba70eb Adjusted the makefile and example main
for some odd reason the main file in the makefile was set to main.c not main.cpp  corrected this as there is no main.c anywhere in this repo. Also removed references to HardwareUsb.h, since those files dont exist yet (the originals were depricated and removed)
2010-05-20 23:42:00 -04:00
AJM 7d09802153 modified the makefile to build the usb related files/removed all uintx_t to uintx 2010-05-20 23:36:46 -04:00
AJM ba9ff3861b added a delay to the resrt slide to allow enough time for graceul closures of the serial port 2010-05-20 22:09:16 -04:00
AJM a86ec7c81d c++ ified all of the usb_core files, added the auto-reset feature to the virtual com port, got the descriptors in functional although not pretty order that can be fixed using the attribute packing 2010-05-20 22:09:15 -04:00
AJM 85fb99616f removed usb files from the libmaple into the application level core lib. 2010-05-20 22:09:15 -04:00
Perry Hung a881d0d735 trivial: new cscope rule and warning fix
Fixed nvic.c warning
2010-04-30 01:07:55 -04:00
Perry Hung b5ddce7dc8 Fixed examples, added spi example, moved pure virtual function handler
out of main to cxxabi-compat.cpp.
2010-04-29 01:14:03 -04:00
Perry Hung 62552a6f3f Refactoring:
The 'core' directory has now been renamed to 'wirish.' Wirish is our
version of the Arduino Wiring language.
2010-04-25 18:08:56 -04:00
Perry Hung e608ac87af Initial SPI implementation.
Squashed commit of the following:

commit b41eb846ca
Author: Perry Hung <iperry@alum.mit.edu>
Date:   Sat Apr 24 04:09:16 2010 -0400

    Turn the other peripherals back on. Not extensively tested for
    interactions between peripherals.

commit bf4fc3bf6b
Author: Perry Hung <iperry@alum.mit.edu>
Date:   Sat Apr 24 03:16:35 2010 -0400

    Upper level libmaple interface

    Added a C++ HardwareSPI class to access the SPI interface. See
    HardwareSPI.cpp and HardwareSPI.h for documentation.

commit 17e0e5edde
Author: Perry Hung <iperry@alum.mit.edu>
Date:   Thu Apr 22 02:36:01 2010 -0400

    Initial SPI Polling implementation.

    Initial commit of a polling-based SPI driver. The driver is limited to
    synchronous, blocking sends and a 8-bit data frame format. Tested on
    SPI1 and SPI2.

    Other peripherals are temporarily disabled, and the rx function
    is untested until I find a good peripheral to test everything on.
2010-04-24 04:16:47 -04:00
Perry Hung 32feb1c68b Makefile fix: removed extra line from outdirs 2010-04-01 22:30:33 -04:00
Perry Hung 68818ab2d6 Cleanup: trivial rename for exception handlers, removed unnecessary
stm32f10x_conf.h
2010-04-01 22:28:00 -04:00
Perry Hung 4e51e057bb Merge branch 'master' of git@github.com:leaflabs/libmaple
Conflicts:
	Makefile
	core/pwm.c
	core/wiring.c
	libmaple/usb.h
	src/wiring/pwm.c
	stm32lib/inc/cortexm3_macro.h
	stm32lib/inc/stm32f10x_adc.h
	stm32lib/inc/stm32f10x_bkp.h
	stm32lib/inc/stm32f10x_can.h
	stm32lib/inc/stm32f10x_crc.h
	stm32lib/inc/stm32f10x_dac.h
	stm32lib/inc/stm32f10x_dbgmcu.h
	stm32lib/inc/stm32f10x_dma.h
	stm32lib/inc/stm32f10x_exti.h
	stm32lib/inc/stm32f10x_flash.h
	stm32lib/inc/stm32f10x_fsmc.h
	stm32lib/inc/stm32f10x_gpio.h
	stm32lib/inc/stm32f10x_i2c.h
	stm32lib/inc/stm32f10x_iwdg.h
	stm32lib/inc/stm32f10x_lib.h
	stm32lib/inc/stm32f10x_map.h
	stm32lib/inc/stm32f10x_nvic.h
	stm32lib/inc/stm32f10x_pwr.h
	stm32lib/inc/stm32f10x_rcc.h
	stm32lib/inc/stm32f10x_rtc.h
	stm32lib/inc/stm32f10x_sdio.h
	stm32lib/inc/stm32f10x_spi.h
	stm32lib/inc/stm32f10x_systick.h
	stm32lib/inc/stm32f10x_tim.h
	stm32lib/inc/stm32f10x_type.h
	stm32lib/inc/stm32f10x_usart.h
	stm32lib/inc/stm32f10x_wwdg.h
	stm32lib/src/stm32f10x_adc.c
	stm32lib/src/stm32f10x_bkp.c
	stm32lib/src/stm32f10x_can.c
	stm32lib/src/stm32f10x_crc.c
	stm32lib/src/stm32f10x_dac.c
	stm32lib/src/stm32f10x_dbgmcu.c
	stm32lib/src/stm32f10x_dma.c
	stm32lib/src/stm32f10x_exti.c
	stm32lib/src/stm32f10x_flash.c
	stm32lib/src/stm32f10x_fsmc.c
	stm32lib/src/stm32f10x_gpio.c
	stm32lib/src/stm32f10x_i2c.c
	stm32lib/src/stm32f10x_iwdg.c
	stm32lib/src/stm32f10x_lib.c
	stm32lib/src/stm32f10x_nvic.c
	stm32lib/src/stm32f10x_pwr.c
	stm32lib/src/stm32f10x_rcc.c
	stm32lib/src/stm32f10x_rtc.c
	stm32lib/src/stm32f10x_sdio.c
	stm32lib/src/stm32f10x_spi.c
	stm32lib/src/stm32f10x_systick.c
	stm32lib/src/stm32f10x_tim.c
	stm32lib/src/stm32f10x_usart.c
	stm32lib/src/stm32f10x_wwdg.c
2010-03-30 23:35:40 -04:00
Perry Hung 1be7df0937 Removed remaining STM32 types and #defines.
Updated usb subsystem to use libmaple types, removed STM32 peripheral
library from the Makefile
2010-03-30 22:58:47 -04:00
Perry Hung 869ed39e4c Removed STM32 flash code, replaced with barebones hacks for now.
At this point, there shouldn't be any STM code being compiled and linked
against. There are still a bunch of STM header includes, though.
2010-03-30 22:51:28 -04:00
Perry Hung 2c33d55bae Merge branch 'master' into rcc-dev
Conflicts:
	Makefile
2010-03-30 22:03:00 -04:00
bnewbold 1d3861ef93 Major hierarchy reorganization; see README.
copy-to-ide and Makefile updated to conform; .gitignore added;
LICENSE added
2010-03-31 09:43:10 +08:00
bnewbold e7d6004945 Major hierarchy reorganization; see README.
copy-to-ide and Makefile updated to conform; .gitignore added;
LICENSE added
2010-03-30 20:52:45 -04:00
Perry Hung ca8033c92a Started removing STM32 STD RCC code. Compiles but doesn't run yet. 2010-03-25 19:50:13 -04:00
bnewbold f045e25ac5 building instructions and added OS forking to Makefile 2010-03-16 20:28:55 -04:00
ajmeyer@mit.edu 966e4ac594 modded the library makefile to work with patched dfu-util, also added the USER_FLASH section to the rom linker
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@131 749a229e-a60e-11de-b98f-4500b42dc123
2010-02-12 20:57:45 +00:00
iperry a597f3f3ce forgot to turn on the interrupt for usar3
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@110 749a229e-a60e-11de-b98f-4500b42dc123
2010-01-10 14:06:15 +00:00
iperry f1598e62ac enabled serial3
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@109 749a229e-a60e-11de-b98f-4500b42dc123
2010-01-10 13:22:52 +00:00
iperry c7163bee35 typo
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@108 749a229e-a60e-11de-b98f-4500b42dc123
2010-01-10 07:59:00 +00:00
iperry 06576660b9 git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@107 749a229e-a60e-11de-b98f-4500b42dc123 2010-01-10 07:58:30 +00:00
iperry 5ca8a80d1f moved jtag target and fixed flash target
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@106 749a229e-a60e-11de-b98f-4500b42dc123
2010-01-10 07:42:49 +00:00
iperry 8012e52afb Tweaked makefile to get rid of silly make flags. Added a udev rule in support/ to eliminate sudo req for make program
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@105 749a229e-a60e-11de-b98f-4500b42dc123
2010-01-10 07:30:18 +00:00
iperry a038b4f987 changed math.h to wiring_math.h to avoid collision with newlib's math library
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@99 749a229e-a60e-11de-b98f-4500b42dc123
2010-01-08 01:22:43 +00:00
ajmeyer@mit.edu 2addfe8c42 Added a print class for USB, works identically to the Serial object. Bugs out if you try and pump more than 64 bytes through it in a single packet (which is really the OS's decision). This can be fixed
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@93 749a229e-a60e-11de-b98f-4500b42dc123
2010-01-07 03:31:35 +00:00
ajmeyer@mit.edu 3bb04834ff added demo code on main.cpp to build a simple two way channel over the virtual serial port. To use this, run ln -s /dev/ttyACM0 /dev/ttyS9 then open up Maple IDE and select ttyS9 as the serial port. you should be able to see the count of the number of bytes in as well as the blink message
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@78 749a229e-a60e-11de-b98f-4500b42dc123
2009-12-19 18:23:31 +00:00
iperry acf59b1abb Added licensing. Moved lots of header files around. Added HardwareSerial reads, writes. Tweaked some of the util and assert functions. Added various useful routines for printing stuff to the serial port. Continued moving out stm32lib. Slightly more consistent naming, this will come in another change.
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@74 749a229e-a60e-11de-b98f-4500b42dc123
2009-12-19 10:53:07 +00:00
ajmeyer@mit.edu 7021adc50a added USB support (TX over virtual com port), the linker modifications to work with the bootloader, a modified libcs-lanchon-stm32.a, and the arduino-required main.cxx and WProgram.h
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@72 749a229e-a60e-11de-b98f-4500b42dc123
2009-12-19 08:03:54 +00:00
iperry 32e57dac2e Initial commit of library code, moved from leaftest repo
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@69 749a229e-a60e-11de-b98f-4500b42dc123
2009-12-17 02:37:07 +00:00