1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-18 02:15:19 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
Werner Almesberger
6909fc232a atusb/fw/Makefile: introduce target-specific compliation variants
- Makefile (USB_OBJS): moved into OBJS and BOOT_OBJS
- Makefile (OBJS): atu2.o is now app-atu2.o
- Makefile (BOOT_OBJS): atu2.o is now boot-atu2.o
- Makefile (MKDEP, %.o): moved dependency generation to macro $(MKDEP)
- Makefile (app-%.o): build from usb/%.c
- Makefile (boot -%.o): build from usb/%.c and set -DBOOT_LOADER
2011-06-26 06:56:01 -03:00
Werner Almesberger
2d7ee91430 atusb/fw/: added transition from runtime to DFU mode according to DFU spec
- descr.c (config_descriptor): added DFU interface descriptor
- ep0.c (my_dfu_setup, my_set_interface, ep0_init): added DFU
  interface switching
- ep0.c (my_reset, ep0_init): CPU-reset (into boot loader) on
  USB bus reset when in appDETACH
- Makefile (OBJS): added dfu_common.o
2011-06-10 23:26:36 -03:00
Werner Almesberger
2544004a86 atusb/fw/: moved common elements of DFU processing to dfu_common.c
- dfu.c (functional_descriptor, dfu, my_descr), dfu.h (dfu_my_descr):
  moved to dfu_common.c
- dfu.c (my_setup), dfu.h (dfu_setup_common), dfu_common.c
  (dfu_setup_common): moved handling of DFU_GETSTATUS, DFU_CLRSTATUS,
  and DFU_GETSTATE from my_setup to dfu_setup_common
- dfu_common.c (my_descr), dfu.c (dfu_init): renamed my_descr to
  dfu_my_descr
- Makefile (BOOT_OBJS): added dfu_common.o
2011-06-10 22:04:12 -03:00
Werner Almesberger
e678401ac3 atusb/fw/: split board functions into app-only/shared part (boot overlflowed)
- board.c (timer_h, reset_cpu, read_irq, slp_tr, timer_poll,
  timer_read, gpio): moved to new file board_app.c
- Makefile (OBJS): added board_app.o
2011-06-09 12:48:44 -03:00
Werner Almesberger
b82db55f4a atusb/fw/Makefile: new target "update" to update the application via DFU
- Makefile (USB_ID, dfu): moved USB ID to variable, for sharing
- Makefile (.PHONY, update): new target to reset atusb and to DFU new
  firmware
2011-05-11 05:29:54 -03:00
Werner Almesberger
85f60de9d5 atusb/fw: use the unique serial number of the ATmega8/16/32U2 for iSerialNumber
- usb/usb.h (USB_LANGID_ENGLISH_US): added USB LANGID for US-English
- board.h (board_sernum), board.c (board_sernum, hex, get_sernum,
  board_init): provide the board's serial number in "board_sernum"
  (UTF-encoded)
- sernum.h (sernum_get_descr), sernum.c (sernum_get_descr): return
  string descriptors for the serial number
- descr.c (device_descriptor), usb/dfu.c (device_descriptor):
  set iSerialNumber if serial number is available
- atusb.c (main), usb/dfu.c (my_descr): call sernum_get_descr for
  unknown descriptors
- Makefile (OBJS, BOOT_OBJS): added sernum.o
2011-05-10 17:23:08 -03:00
Werner Almesberger
fd91546c59 atusb/fw/Makefile (dfu): our functional descriptor is fine, no need for -t
What caused the error that looked like a problem with the functional
descriptor was in fact the boot loader resetting between the bus scan
and retrieval of the descriptor.
2011-05-10 11:53:32 -03:00
Werner Almesberger
0db361d49d atusb/fw/Makefile (dfu): pass transfer size to hide DFU non-compliance
We currently don't provide the DFU Functional Descriptor, which modern
versions of dfu-util request to determine the transfer size. Luckily,
they don't do this if the transfer size is given on the command line.
2011-05-09 22:02:28 -03:00
Werner Almesberger
eeb3af6a03 atusb/fw: fixed USB bus reset handling by software
- usb/atu2.c (ep_init): moved before usb_poll
- usb/atu2.c (usb_poll): register bit was used as mask, not as shift
- usb/atu2.c (usb_poll): call ep_init on USB bus reset
- usb/atu2.c (usb_reset): don't make USB bus reset force a hardware reset
- Makefile (.PHONY, dfu): new target to upload the application with DFU
2011-05-09 21:13:41 -03:00
Werner Almesberger
c5992bc675 atusb/fw/Makefile (.PHONY): added development-only phony targets 2011-05-09 21:12:26 -03:00
Werner Almesberger
f87bdce41f atusb/fw/Makefile: added auxiliary Flash programming target (for development)
- Makefile (prog-app): flash the application, without the boot loader
- Makefile (prog-read): retrieve the Flash content
2011-03-11 16:24:49 -03:00
Werner Almesberger
e29046d19b atusb/fw/Makefile (prog): corrected boot loader size in hfuse 2011-03-11 16:23:42 -03:00
Werner Almesberger
edfb8a94eb atusb/fw/Makefile: clean up handing of boot loader base address
- Makefile (BOOT_ADDR, boot.elf): use variable instead of hiding the
  address in a command
- Makefile (CFLAGS): pass BOOT_ADDR as a macro
- Makefile: removed commented-out application flashing code
2011-03-11 16:21:39 -03:00
Werner Almesberger
b5fd6e3132 atusb/fw/Makefile: lock fuse refuses 0xef; set it to 0x2f to pass verification 2011-03-09 03:11:15 -03:00
Werner Almesberger
1dcc83391e atusb/fw/Makefile: put -mmcu into CFLAGS so that DEPEND uses it, too
- Makefile ($(NAME).elf, boot.elf, %.o): don't pass -mmcu explicitly
- Makefile (CFLAGS): include -mmcu, so that it's also picked up by
  $(DEPEND)
2011-03-09 01:45:35 -03:00
Werner Almesberger
341b348ac0 atusb/fw/Makefile (clean): also remove the boot loader 2011-03-09 00:57:01 -03:00
Werner Almesberger
e8bed1f3c1 atusb/fw/: flash a boot loader instead of the application (in progress)
- boot.c: basic boot loader that runs DFU for 2 s, then starts the payload
- board.h (DFU_USB_VENDOR, DFU_USB_PRODUCT): added USB IDs for DFU
- flash.c: stubs for board-specific Flash functions
- Makefile: build boot.hex for the boot loader
- Makefile (prog): load the boot loader at its rightful place
- Makefile (prog): also set hfuse and the lock fuse
2011-03-09 00:41:32 -03:00
Werner Almesberger
2f85fa9d14 atusb/fw/Makefile: abstract host so that one can use HOST=ben instead of jlime 2011-03-04 21:50:01 -03:00
Werner Almesberger
313fb7c190 atusb/fw/Makefile (CFLAGS): simplify -I../fw/include to -Iinclude 2011-02-22 00:24:53 -03:00
Werner Almesberger
78cfc8ffeb moved atusb/fw3/ to atusb/fw/ 2011-02-22 00:24:07 -03:00
Werner Almesberger
2642b9e1c3 atusb-sil/: moved C8051F326-related material out of atusb/
- Makefile, atusb.pro, atusb.sch, atrf.sch, usb.sch, atusb.cmp, atusb.brd:
  resurrected from git history (commit
  14b00823b0)
- fw/: moved all C8051F326-specific files over from atusb/fw/
- fw/include/: copied MCU-independent files over from atusb/fw/include/
2011-02-22 00:17:13 -03:00
Werner Almesberger
ad2c72fa7f atusb: firmware update for the 2010-12-16 board series
- fw/Makefile: replaced "make" with $(MAKE) (just for style)
- common/Makefile.common: Makefile settings shared within project. For now,
  this contains only the board version, which defaults to 2010-12-16.
- fw/common/Makefile, fw/boot/Makefile, fw/atusb/Makefile: include
  common/Makefile.common
- fw/common/Makefile, fw/boot/Makefile, fw/atusb/Makefile: pass board
  version to cpp and gcc
- fw/atusb/atusb.c (init_io): individually set IRQ_RF to one, LED and TST
  to zero
- fw/atusb/atusb.c (init_io): added macros to set all unused pins to zero
  in a way that doesn't need updating if a signal moves from one pin to
  another
- include/atusb/ep0.h: added hardware type 1 (2010-12-16 design)
- common/config.h: set hardware type depending on board version
- common/io.h: assign pins depending on board version
2010-12-17 23:01:31 -03:00
Werner Almesberger
7e71f98007 The Great ATSPI Renaming, part 1: rename atusb firmware files from atspi to atusb
- atusb/fw/atspi/atspi.c: renamed to atusb/fw/atspi/atusb.c
- atusb/fw/atspi/Makefile: track above change
- atusb/fw/include/atspi/: renamed to atusb/fw/include/atusb/
- atusb/fw/common/config.h, atusb/fw/atspi/atspi.c, atusb/fw/atspi/descr.c,
  atusb/fw/atspi/ep0.c: track change of include location
- atusb/fw/atspi/: renamed to atusb
- atusb/fw/Makefile: track above change
- tools/atspi-id/atspi-id.c, tools/atspi-trim/atspi-trim.c,
  tools/lib/atusb.c: track change of include location
2010-11-11 08:26:01 -03:00
Werner Almesberger
b493f09363 Great renaming: atrf/wpan-atrf* becomes atusb/atusb*
- atrf/: rename to atusb/
- atrf/wpan-atrf.pro, atrf/wpan-atrf.sch, atrf/wpan-atrf.brd,
  atrf/wpan-atrf.cmp: rename to atusb.*
- atrf/Makefile: change ben-wpan to atusb
- atrf/atusb.pro (LastNetListRead): update for name change
- tools/Makefile.common (CFLAGS): change fw/ include location from atrf/
  to atusb/
2010-10-25 00:10:00 -03:00