Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update to Fubarino SD varient files to shut off secondary oscillator …

…so we can use those two pins. (note: still uses plib)
  • Loading branch information...
commit 8b37c8b4617bdad51e1333bbff2a48812580270f 2 parents 01321cf + caaab13
@EmbeddedMan EmbeddedMan authored
View
11 .gitignore
@@ -1,3 +1,8 @@
-.DS_Store
-.svn
-
+## generic files to ignore
+*~
+*.lock
+*.DS_Store
+*.swp
+*.out
+*.class
+*.svn
View
10 app/src/processing/app/Base.java
@@ -270,7 +270,7 @@ public Base(String[] args) {
//Issue: 104 Need to support loading examples, and libraries based on platform
String platformname = getBoardPreferences().get("platform");
logger.debug("!!!Base: Platform Name: " + platformname);
- String libraryPath = getPlatformPreferences(platformname).get("library.core.path");
+ String libraryPath = getPlatformPreferences(platformname).get("library.path");
logger.debug("!!!Base: Library Path: " + libraryPath);
librariesFolder = getContentFile(libraryPath);
logger.debug("Base: librariesFolder: " + librariesFolder);
@@ -962,9 +962,9 @@ public void rebuildImportMenu(JMenu importMenu) {
//Find the current target. Get the platform, and then select the correct name and core path.
String platformname = this.getBoardPreferences().get("platform");
String targetname = this.getPlatformPreferences(platformname).get("name");
- String libraryPath = this.getPlatformPreferences(platformname).get("library.core.path");
+ String libraryPath = this.getPlatformPreferences(platformname).get("library.path");
- logger.debug("Base: library.core.path = " + libraryPath);
+ logger.debug("Base: library.path = " + libraryPath);
logger.debug("Base: DEBUG: add libraries.");
JMenuItem platformItem = new JMenuItem(targetname);
platformItem.setEnabled(false);
@@ -1002,12 +1002,12 @@ public void rebuildExamplesMenu(JMenu menu) {
String targetname = this.getPlatformPreferences(platformname).get("name");
logger.debug("Base: rebuildExamplesMenu: Target Name: " + targetname);
- String libraryPath = this.getPlatformPreferences(platformname).get("library.core.path");
+ String libraryPath = this.getPlatformPreferences(platformname).get("library.path");
menu.removeAll();
boolean found = addSketches(menu, examplesFolder, false);
- logger.debug("Base: RebuildExamplesMenu: DEBUG: Find examples in library.core.path = " + libraryPath);
+ logger.debug("Base: RebuildExamplesMenu: DEBUG: Find examples in library.path = " + libraryPath);
JMenuItem platformItem = new JMenuItem("Platform: " + targetname);
platformItem.setEnabled(false);
menu.add(platformItem);
View
4 app/src/processing/app/debug/Compiler.java
@@ -711,9 +711,11 @@ void compileLink(String avrBasePath, String buildPath, String corePath, ArrayLis
primaryClassName,
objectFileList,
buildPath + File.separator + "core.a",
- buildPath,
+ buildPath,
corePath,
configPreferences.get("ldscript"),
+ corePath,
+ configPreferences.get("ldcommon")
};
commandString = compileFormat.format( Args );
execAsynchronously(commandString);
View
16 hardware/pic32/variants/fubarino_sd_v11/Board_Data.c
@@ -350,6 +350,13 @@ const uint8_t analog_pin_to_channel_PGM[] = {
//#endif
/* ------------------------------------------------------------ */
+/* Include Files for Board Customization Functions */
+/* ------------------------------------------------------------ */
+#if (OPT_BOARD_INIT != 0)
+#include <plib.h>
+#endif
+
+/* ------------------------------------------------------------ */
/* Board Customization Functions */
/* ------------------------------------------------------------ */
/* */
@@ -384,7 +391,16 @@ const uint8_t analog_pin_to_channel_PGM[] = {
#if (OPT_BOARD_INIT != 0)
void _board_init(void) {
+ //* Turn Secondary oscillator off
+
+ unsigned int dma_status;
+ unsigned int int_status;
+ mSYSTEMUnlock(int_status, dma_status);
+
+ OSCCONCLR = _OSCCON_SOSCEN_MASK;
+
+ mSYSTEMLock(int_status, dma_status);
}
#endif
View
56 hardware/pic32/variants/fubarino_sd_v11/Board_Defs.h
@@ -54,7 +54,7 @@
** refer to periperhals on the board generically.
*/
-#define _BOARD_NAME_ "Fubarino SD"
+#define _BOARD_NAME_ "FubarinoSD"
/* Define the peripherals available on the board.
*/
@@ -67,7 +67,7 @@
#define NUM_SERIAL_PORTS 2
#define NUM_SPI_PORTS 1
-#define NUM_I2C_PORTS 2
+#define NUM_I2C_PORTS 1
#define NUM_DSPI_PORTS 1
#define NUM_DTWI_PORTS 2
@@ -117,19 +117,19 @@
/* Timer Pin Declarations */
/* ------------------------------------------------------------ */
-#define PIN_OC1 4
-#define PIN_OC2 7
-#define PIN_OC3 8
-#define PIN_OC4 9
-#define PIN_OC5 10
+#define PIN_OC1 5
+#define PIN_OC2 8
+#define PIN_OC3 9
+#define PIN_OC4 10
+#define PIN_OC5 11
-#define PIN_IC1 0
-#define PIN_IC2 1
-#define PIN_IC3 2
-#define PIN_IC4 3
-#define PIN_IC5 10
+#define PIN_IC1 1
+#define PIN_IC2 2
+#define PIN_IC3 3
+#define PIN_IC4 4
+#define PIN_IC5 11
-//#define PIN_TCK1 46 (TCK would be what?)
+#define PIN_TCK1 6
//#define PIN_TCK2 not available on the chip
//#define PIN_TCK3 not available on the chip
//#define PIN_TCK4 not available on the chip
@@ -153,14 +153,16 @@
** the default SPI port as it's pin numbers stay constant on all
** devices.
*/
-const static uint8_t SS = 27; // PIC32 SS2
-const static uint8_t MOSI = 26; // PIC32 SDO2
-const static uint8_t MISO = 25; // PIC32 SDI2
-const static uint8_t SCK = 24; // PIC32 SCK2
+/// TODO: For Fubarino, do we need these?
+const static uint8_t SS = 105; // PIC32 SS2
+const static uint8_t MOSI = 104; // PIC32 SDO2
+const static uint8_t MISO = 103; // PIC32 SDI2
+const static uint8_t SCK = 102; // PIC32 SCK2
/* The Digilent DSPI library uses these ports.
*/
-#define PIN_DSPI0_SS 27
+/// TODO: For Fubarino, do we need these?
+#define PIN_DSPI0_SS 105
/* ------------------------------------------------------------ */
/* Analog Pins */
@@ -192,14 +194,14 @@ const static uint8_t SCK = 24; // PIC32 SCK2
/* These define the pin numbers for the various change notice
** pins.
*/
-#define PIN_CN0 6
-#define PIN_CN1 5
-#define PIN_CN2 34
-#define PIN_CN3 33
-#define PIN_CN4 32
-#define PIN_CN5 31
-#define PIN_CN6 30
-#define PIN_CN7 29
+#define PIN_CN0 7
+#define PIN_CN1 6
+#define PIN_CN2 33
+#define PIN_CN3 32
+#define PIN_CN4 31
+#define PIN_CN5 30
+#define PIN_CN6 29
+#define PIN_CN7 28
#define PIN_CN8 24
#define PIN_CN9 25
#define PIN_CN10 26
@@ -294,7 +296,7 @@ extern const uint8_t analog_pin_to_channel_PGM[];
/* */
/* ------------------------------------------------------------ */
-#define OPT_BOARD_INIT 0 //board needs no special init code
+#define OPT_BOARD_INIT 1 //board needs special init code
#define OPT_BOARD_DIGITAL_IO 0 //board does not extend digital i/o functions
#define OPT_BOARD_ANALOG_READ 0 //board does not extend analogRead
#define OPT_BOARD_ANALOG_WRITE 0 //board does not extend analogWrite

0 comments on commit 8b37c8b

Please sign in to comment.
Something went wrong with that request. Please try again.