diff --git a/.build_Debug/src/app_flash_util.xc.d b/.build_Debug/src/app_flash_util.xc.d deleted file mode 100644 index ba0cbf4..0000000 --- a/.build_Debug/src/app_flash_util.xc.d +++ /dev/null @@ -1,3 +0,0 @@ -.build_Debug/src/app_flash_util.xc.d ./.build_Debug/src/app_flash_util.xc.o: ./src/app_flash_util.xc \ - ../../flash_util/app_flash_util/src/flash_interface.h - diff --git a/.build_Debug/src/app_flash_util.xc.o b/.build_Debug/src/app_flash_util.xc.o deleted file mode 100644 index 64b3ecc..0000000 Binary files a/.build_Debug/src/app_flash_util.xc.o and /dev/null differ diff --git a/.build_Debug/src/flash_interface.c.d b/.build_Debug/src/flash_interface.c.d deleted file mode 100644 index f8ab1e6..0000000 --- a/.build_Debug/src/flash_interface.c.d +++ /dev/null @@ -1 +0,0 @@ -.build_Debug/src/flash_interface.c.d ./.build_Debug/src/flash_interface.c.o: ./src/flash_interface.c ./src/flash_interface.h diff --git a/.build_Debug/src/flash_interface.c.o b/.build_Debug/src/flash_interface.c.o deleted file mode 100644 index da70400..0000000 Binary files a/.build_Debug/src/flash_interface.c.o and /dev/null differ diff --git a/.settings/org.eclipse.cdt.core.prefs b/.settings/org.eclipse.cdt.core.prefs deleted file mode 100644 index bf2d6ba..0000000 --- a/.settings/org.eclipse.cdt.core.prefs +++ /dev/null @@ -1,32 +0,0 @@ -#Mon Jun 30 17:11:52 CDT 2014 -eclipse.preferences.version=1 -environment/project/com.xmos.cdt.toolchain.1366106021/XMOS_MODULE_PATH/delimiter=\: -environment/project/com.xmos.cdt.toolchain.1366106021/XMOS_MODULE_PATH/operation=append -environment/project/com.xmos.cdt.toolchain.1366106021/XMOS_MODULE_PATH/value=/Users/chrisalger/.xmos/repos/sw_startkit_examples/app_spinning_bar -environment/project/com.xmos.cdt.toolchain.1366106021/append=true -environment/project/com.xmos.cdt.toolchain.1366106021/appendContributed=true -environment/project/com.xmos.cdt.toolchain.1432512229/XMOS_MODULE_PATH/delimiter=\: -environment/project/com.xmos.cdt.toolchain.1432512229/XMOS_MODULE_PATH/operation=append -environment/project/com.xmos.cdt.toolchain.1432512229/XMOS_MODULE_PATH/value=/Users/chrisalger/.xmos/repos/sw_startkit_examples/app_spinning_bar -environment/project/com.xmos.cdt.toolchain.1432512229/append=true -environment/project/com.xmos.cdt.toolchain.1432512229/appendContributed=true -environment/project/com.xmos.cdt.toolchain.1633506018/XMOS_MODULE_PATH/delimiter=\: -environment/project/com.xmos.cdt.toolchain.1633506018/XMOS_MODULE_PATH/operation=append -environment/project/com.xmos.cdt.toolchain.1633506018/XMOS_MODULE_PATH/value=/Users/chrisalger/.xmos/repos/sw_startkit_examples/app_spinning_bar -environment/project/com.xmos.cdt.toolchain.1633506018/append=true -environment/project/com.xmos.cdt.toolchain.1633506018/appendContributed=true -environment/project/com.xmos.cdt.toolchain.1830980035/XMOS_MODULE_PATH/delimiter=\: -environment/project/com.xmos.cdt.toolchain.1830980035/XMOS_MODULE_PATH/operation=append -environment/project/com.xmos.cdt.toolchain.1830980035/XMOS_MODULE_PATH/value=/Users/chrisalger/.xmos/repos/sw_startkit_examples/app_spinning_bar -environment/project/com.xmos.cdt.toolchain.1830980035/append=true -environment/project/com.xmos.cdt.toolchain.1830980035/appendContributed=true -environment/project/com.xmos.cdt.toolchain.18312953/XMOS_MODULE_PATH/delimiter=\: -environment/project/com.xmos.cdt.toolchain.18312953/XMOS_MODULE_PATH/operation=append -environment/project/com.xmos.cdt.toolchain.18312953/XMOS_MODULE_PATH/value=/Users/chrisalger/.xmos/repos/sw_startkit_examples/app_spinning_bar -environment/project/com.xmos.cdt.toolchain.18312953/append=true -environment/project/com.xmos.cdt.toolchain.18312953/appendContributed=true -environment/project/com.xmos.cdt.toolchain.1902273359/XMOS_MODULE_PATH/delimiter=\: -environment/project/com.xmos.cdt.toolchain.1902273359/XMOS_MODULE_PATH/operation=append -environment/project/com.xmos.cdt.toolchain.1902273359/XMOS_MODULE_PATH/value=/Users/chrisalger/.xmos/repos/sw_startkit_examples/app_spinning_bar -environment/project/com.xmos.cdt.toolchain.1902273359/append=true -environment/project/com.xmos.cdt.toolchain.1902273359/appendContributed=true diff --git a/Makefile b/Makefile index f6f39d2..10d5b8e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,16 @@ # The TARGET variable determines what target system the application is # compiled for. It either refers to an XN file in the source directories # or a valid argument for the --target option when compiling + +QSPI_FLASH=1 + +ifeq ($(QSPI_FLASH),1) +FLASH_ARGS = -lquadflash -DQUAD_SPI_FLASH=1 +TARGET = xk-audio-216-mc.xn +else +FLASH_ARGS = -lflash TARGET = STARTKIT +endif # The APP_NAME variable determines the name of the final .xe file. It should # not include the .xe postfix. If left blank the name will default to @@ -11,13 +20,14 @@ APP_NAME = app_flash_util # The USED_MODULES variable lists other module used by the application. USED_MODULES = + # The flags passed to xcc when building the application # You can also set the following to override flags for a particular language: # XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS # If the variable XCC_MAP_FLAGS is set it overrides the flags passed to # xcc for the final link (mapping) stage. -XCC_FLAGS_Debug = -O0 -g -lflash -XCC_FLAGS_Release = -O2 -g -lflash +XCC_FLAGS_Debug = -O0 -g $(FLASH_ARGS) +XCC_FLAGS_Release = -O2 -g $(FLASH_ARGS) # The VERBOSE variable, if set to 1, enables verbose output from the make system. VERBOSE = 0 diff --git a/bin/Debug/app_flash_util_Debug.xe b/bin/Debug/app_flash_util_Debug.xe deleted file mode 100644 index ef56f28..0000000 Binary files a/bin/Debug/app_flash_util_Debug.xe and /dev/null differ diff --git a/src/app_flash_util.xc b/src/app_flash_util.xc index 1ffcaa4..6cbcd6f 100644 --- a/src/app_flash_util.xc +++ b/src/app_flash_util.xc @@ -7,7 +7,6 @@ #include #include -#include #include #include #include @@ -15,7 +14,23 @@ #include "SpecMacros.h" #include "flash_interface.h" +#ifdef QUAD_SPI_FLASH +#include +#include +#else +#include +#include +#endif +#ifdef QUAD_SPI_FLASH +fl_QSPIPorts pFlash = +{ + XS1_PORT_1B, + XS1_PORT_1C, + XS1_PORT_4B, + XS1_CLKBLK_5 +}; +#else fl_SPIPorts pFlash = { PORT_SPI_MISO, PORT_SPI_SS, @@ -23,11 +38,7 @@ fl_SPIPorts pFlash = { PORT_SPI_MOSI, XS1_CLKBLK_1 }; - - - -fl_DeviceSpec flash_devices[] = {FL_DEVICE_WINBOND_W25X20}; - +#endif void dataFlashMenu(void) { @@ -171,13 +182,11 @@ int main() { - - - printf("Starting Application\n"); /* Open a connection to the SPI flash */ - rValue = fl_connectToDevice(pFlash, flash_devices, 1); + //rValue = fl_connectToDevice(pFlash, flash_devices, 1); + rValue = fl_connect(pFlash); if(rValue) { printf("Error - Connecting to device\n"); diff --git a/src/flash_interface.c b/src/flash_interface.c index 7a57099..048c925 100644 --- a/src/flash_interface.c +++ b/src/flash_interface.c @@ -1,7 +1,13 @@ #include -#include + #include "flash_interface.h" +#ifdef QUAD_SPI_FLASH +#include +#include +#else +#include #include +#endif #include #include #include @@ -25,7 +31,6 @@ static int current_flash_subpage_index = 0; static unsigned char current_flash_page_data[256]; - /* Find flash images and print out the information */ int flashOpen(){ diff --git a/xk-audio-216-mc.xn b/xk-audio-216-mc.xn new file mode 100644 index 0000000..a9f765b --- /dev/null +++ b/xk-audio-216-mc.xn @@ -0,0 +1,96 @@ + + + Board + XS2 MC Audio + + tileref tile[2] + tileref usb_tile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --> + --> + + + + + + + + + + + + + + + + + + --> + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +