hello,
I am trying to create a new board in order to port ERIKA on the hardware I have at home. it's a http://www.dangerousprototypes.com/docs/Web_Platform, with a dsPIC33FJ128GP204.
as I did not find the related wiki pages straight away, I created a new CPU and board from the files found in ~/.eclipse/. After reading the wiki, I fixed a few things and still have the makefile to write.
I have managed to set define the LED pins and functions, but not for USB, SD card, EEPROM. Examples I've found still have a TODO above the USB section. I have not actively looked for SD or EEPROM yet. USB support on the WP is achieved with a FT232 chip, so it should be pretty straightforward to setup.
another problem I stumbled onto is understanding the configuration of the ethernet device. I copied code from ee_ethernet_enc28j60.h and included it directly in ee_board.h (the ethernet port is not an option on the WP), but could not figure out how to specify which of the CPU pins are used.
could I have some advice/help on how to get the missing peripherals defined and working?
thank you
creating new board
Moderator: paolo.gai
Re: creating new board
Hi!
First of all, sorry for the delay in the answer! That is a very nice project!
About the new CPU: you do not need to create a new CPU, as the PIC30 architecture is already supported!!! Just look at
http://erika.tuxfamily.org/wiki/index.p ... chip_dsPIC
It should work out of the box
The micro itself is not inserted in the list of supported microcontrollers, so you have to use a MODEL CUSTOM like explained at
http://erika.tuxfamily.org/wiki/index.p ... controller
About the peripherals:
- I suggest you to write a "board" section, not a "cpu" or "mcu" section. the board section contains all the wiring parameters for the various boards supported.
- about USB: FTDI is fine, you can just use the UART and it should work easily
- about EEPROM: I do not think there are drivers on ERIKA about that part yet.
- about SDCARD and TCP/IP: take a look at the contrib/microchip directories, they include various libraries distributed by Microchip, including the tcp/ip and a SDCARD filesystem. We also ported the LWIP platform on some architectures...
- for the pin settings, take a look at the example under examples/pic30/pic30_MultibusBoard_udp_demo, in particular at the file named HardwareProfile.h . it contains the pin assignments.
Ciao,
PJ
First of all, sorry for the delay in the answer! That is a very nice project!
About the new CPU: you do not need to create a new CPU, as the PIC30 architecture is already supported!!! Just look at
http://erika.tuxfamily.org/wiki/index.p ... chip_dsPIC
It should work out of the box
The micro itself is not inserted in the list of supported microcontrollers, so you have to use a MODEL CUSTOM like explained at
http://erika.tuxfamily.org/wiki/index.p ... controller
About the peripherals:
- I suggest you to write a "board" section, not a "cpu" or "mcu" section. the board section contains all the wiring parameters for the various boards supported.
- about USB: FTDI is fine, you can just use the UART and it should work easily
- about EEPROM: I do not think there are drivers on ERIKA about that part yet.
- about SDCARD and TCP/IP: take a look at the contrib/microchip directories, they include various libraries distributed by Microchip, including the tcp/ip and a SDCARD filesystem. We also ported the LWIP platform on some architectures...
- for the pin settings, take a look at the example under examples/pic30/pic30_MultibusBoard_udp_demo, in particular at the file named HardwareProfile.h . it contains the pin assignments.
Ciao,
PJ