Commit a2742381 authored by Iulian Gheorghiu's avatar Iulian Gheorghiu

Add support for RISC_FIVE_FPGA

parent 5b230435
......@@ -25,6 +25,8 @@
#include <board/ATMEL/Xmega-E5_Xplained/defs.h>
#elif defined(Xmega_FPGA)
#include <board/ATMEL/Xmega-FPGA/defs.h>
#elif defined(RiscV_FPGA)
#include <board/RISCV/RISCV-FPGA/defs.h>
#elif defined(FeatherAdaloggerM0)
#include <board/ATMEL/FeatherAdaloggerM0/defs.h>
#elif defined(mikroXmega)
......
......@@ -608,7 +608,7 @@ _continue:
#endif
}
}
#ifdef __Xmega_FPGA__
#if defined (__Xmega_FPGA__) || defined (RiscV_FPGA)
bool state_hbtn_0;
GI::IO::read((char *)"hbtn-0", &state_hbtn_0);
#endif
......@@ -1136,7 +1136,7 @@ _continue:
#endif
#ifdef _USE_LSM9DS1
if(lsm9ds1_timer.tick()
#ifdef __Xmega_FPGA__
#if defined (__Xmega_FPGA__) || defined (RiscV_FPGA)
&& state_hbtn_0 == false
#endif
)
......@@ -1393,7 +1393,7 @@ _continue:
#endif
#ifdef _USE_LPS25HB
if(lps25hb_timer.tick()
#ifdef __Xmega_FPGA__
#if defined (__Xmega_FPGA__) || defined (RiscV_FPGA)
&& state_hbtn_0 == true
#endif
)
......
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.2116291671" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-155742018203150287" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.1225914166" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-194723265014775864" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
</project>
OUTPUT_ARCH( "riscv" )
ENTRY(_entry)
MEMORY
{
envm (rx) : ORIGIN = 0x800000, LENGTH = 64k
ram (rwx) : ORIGIN = 0x400000, LENGTH = 16k
}
RAM_START_ADDRESS = ORIGIN(ram); /* Must be the same value MEMORY region ram ORIGIN above. */
RAM_SIZE = LENGTH(ram); /* Must be the same value MEMORY region ram LENGTH above. */
SDATA_SIZE = 2K; /* needs to be calculated for your application */
/*. Highest address of the stack. Used in startup file .*/
__stack_top = ORIGIN(ram) + LENGTH(ram); /*end of SRAM .*/
/*. Generate a link error if heap and stack dont fit into RAM .*/
SECTIONS
{
.text : ALIGN(0x10)
{
__envm_start = .;
KEEP(*(.vectors))
KEEP (*(SORT_NONE(.text.entry)))
. = ALIGN(0x10);
*(.text .text.* .gnu.linkonce.t.*)
*(.plt)
. = ALIGN(0x10);
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend.o(.ctors))
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
*(.rodata .rodata.* .gnu.linkonce.r.*)
*(.gcc_except_table)
*(.eh_frame_hdr)
*(.eh_frame)
KEEP (*(.init))
KEEP (*(.fini))
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(0x10);
} >envm
/* short/global data section */
.sdata : ALIGN(0x10)
{
__ram_start = .;
__sdata_load = LOADADDR(.sdata);
__sdata_start = .;
PROVIDE( __global_pointer$ = . + SDATA_SIZE);
__global_pointer = .;
*(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2)
*(.srodata*)
*(.sdata .sdata.* .gnu.linkonce.s.*)
. = ALIGN(0x10);
__sdata_end = .;
} >ram AT>envm
/* data section */
.data : ALIGN(0x10)
{
__data_load = LOADADDR(.data);
__data_start = .;
*(.got.plt) *(.got)
*(.shdata)
*(.data .data.* .gnu.linkonce.d.*)
. = ALIGN(0x10);
__data_end = .;
__edata = __data_end;
} >ram AT>envm
_edata = .;
_sdata_size = SDATA_SIZE;
/* sbss section */
.sbss : ALIGN(0x10)
{
__sbss_start = .;
*(.sbss .sbss.* .gnu.linkonce.sb.*)
*(.scommon)
. = ALIGN(0x10);
__sbss_end = .;
} > ram
/* sbss section */
.bss : ALIGN(0x10)
{
__bss_start = .;
*(.shbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(0x10);
__bss_end = .;
} > ram
_Min_Stack_Size = 1k;
_Min_Heap_Size = (LENGTH(ram) - (__bss_end - ORIGIN(ram)) - _Min_Stack_Size);
/* End of uninitialized data segment */
_end = .;
/* User_heap_stack section, used to check that there is enough RAM left */
.heap : ALIGN(0x10)
{
PROVIDE ( end = . );
PROVIDE ( _end = . );
__heap_start = .;
. = . + _Min_Heap_Size;
__heap_end = .;
. = . + _Min_Stack_Size;
. = ALIGN(0x10);
_heap_end = __heap_end;
} >ram
/* Remove information from the compiler libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
}
\ No newline at end of file
#include "io_defs.h"
/*------------------------------------------------------------------------------
*
*/
//*****************************************************************************
//
//! This is the code that gets called when the processor receives an unexpected
//! interrupt. This simply enters an infinite loop, preserving the system state
//! for examination by a debugger.
//
//*****************************************************************************
int IntDefaultHandler(unsigned int reason)
{
//
// Go into an infinite loop.
//
while(1)
{
}
}
int IRQHandler_1(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_2(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_3(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_4(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_5(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_6(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_7(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_8(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_9(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_10(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_11(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_12(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_13(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_14(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_15(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int IRQHandler_16(unsigned int) WEAK_ALIAS(IntDefaultHandler);
int (* const intVectors[])(unsigned int) =
{
IRQHandler_1,
IRQHandler_2,
IRQHandler_3,
IRQHandler_4,
IRQHandler_5,
IRQHandler_6,
IRQHandler_7,
IRQHandler_8,
IRQHandler_9,
IRQHandler_10,
IRQHandler_11,
IRQHandler_12,
IRQHandler_13,
IRQHandler_14,
IRQHandler_15,
IRQHandler_16,
};
/*
* io_addrs.h
*
* Created: 8/4/2018 22:10:54
* Author: Work
*/
#ifndef IO_DEFS_H_
#define IO_DEFS_H_
#include <board/RISCV/RISCV-FPGA/xio.h>
#define CPU_FREQ (100000000)
/* Specify number of UART's and capability */
#define UART_INTERFACE_COUNT 1
#define UART_HAVE_STOP_BITS_ONE_AND_HALF 0
#define UART_HAVE_WORD_LEN_5BITS 1
#define UART_HAVE_WORD_LEN_6BITS 1
#define UART_HAVE_WORD_LEN_7BITS 1
#define UART_HAVE_WORD_LEN_9BITS 1
/* Specify number of SPI's and and number of channels per SPI interface */
#define SPI_INTERFACE_COUNT 1
#define SPI_CHANNELS_PER_INTERFACE_COUNT 4
/* Specify number of TWI's */
#define TWI_INTERFACE_COUNT 1
/* Specify number of SCREEN's to be automatically initialized */
#define SCREEN_INTERFACE_COUNT 1
#define FPGA_RTC (*(FPGA_RTC_t *) 0x0000) /* Port */
#define FPGA_UARTA (*(FPGA_USART_t *) 0x0010) /* Uart */
#define FPGA_SPIA (*(FPGA_SPI_t *) 0x0018) /* SPI */
#define FPGA_TWIA (*(FPGA_TWI_t *) 0x0020) /* TWI */
#define FPGA_PORTA (*(FPGA_PORT_t *) 0x0040) /* Push buttons Port */
#define FPGA_PORTB (*(FPGA_PORT_t *) 0x0080) /* Switch Port */
#define FPGA_PORTC (*(FPGA_PORT_t *) 0x00C0) /* LED's Port */
#define FPGA_PORTD (*(FPGA_PORT_t *) 0x0100) /* PMOD A Port */
#define FPGA_PORTE (*(FPGA_PORT_t *) 0x0140) /* PMOD B Port */
#define FPGA_PORTF (*(FPGA_PORT_t *) 0x0180) /* PMOD C Port */
#define FPGA_PORTG (*(FPGA_PORT_t *) 0x01C0) /* Onboard OLED display Port */
#define FPGA_GFX_ACCELA (*(FPGA_GFX_ACCEL_t *) 0x0400) /* */
#endif /* IO_ADDRS_H_ */
/*
* main.cpp
*
* Created on: Apr 16, 2017
* Author: Cutare
*/
//#include <avr/io.h>
#include <main_app.h>
int main(void)
{
main_app();
}
/*
* main.h
*
* Created on: Apr 16, 2017
* Author: Cutare
*/
#ifndef MAIN_H_
#define MAIN_H_
#define USE_GPIO true
#define USE_UART false
#define USE_I2C true
#define USE_SPI true
#define USE_SCREEN true
#define CALIBRATE_TOUCH_ON_STARTUP false
#define USE_WINDOW false
#define USE_SCREEN_GUI false
#define _USE_PASSWORD_PROTECTION false
#define SHOW_SENSORS_RESULT_ON_SCREEN false
#define CONSOLE_UART_IN "uart-0"
#define CONSOLE_UART_OUT "uart-0"
#define CONSOLE_UART_ERR "uart-0"
#define USE_TERMINAL false
#define USE_LWIP false
#define USE_DHCP false
#define USE_LWIP_HTTPD_SERVER false
/* HTTP settings */
#define LWIP_HTTPD_SERVER_DRIVE_PATH "SD1:"
//#define LWIP_HTTPD_SERVER_DRIVE_PATH "USB1:"
#define LWIP_HTTPD_SERVER_PORT 80
#define USE_TFTP false
/* FTP settings */
#define TFTPD_PATH_SERVER_DRIVE_PATH "SD1:"
//#define TFTPD_PATH_SERVER_DRIVE_PATH "USB1:"
#define TFTP_SERVER_PORT 12000
#define USE_FTP false
/* FTP settings */
#define FTPD_PATH_SERVER_DRIVE_PATH "SD1:"
//#define TFTPD_PATH_SERVER_DRIVE_PATH "USB1:"
#define FTP_SERVER_PORT 21
#define USE_SNTP false
#define SNTP_SERVER_ADDRESS "82.197.164.46" /* google */
#define SNTP_UPDATE_DELAY 90000 /* SNTP update every 90 seconds */
//#define _USE_AK8975 "i2c-0"
//#define _USE_BMA250 "spi-0.2"
//#define _USE_BMP180 "i2c-0"
//#define _USE_HIH613x "i2c-0"
//#define _USE_L3GD20 "spi-4.1"
//#define _USE_LEPTON_FLIR false
//#define _USE_MPL3115A2 "i2c-0"
//#define _USE_MPR121 "i2c-0"
//#define _USE_MPU60x0_9150 "i2c-0"
#define _USE_LSM9DS1 "i2c-0"
#define _USE_LPS25HB "i2c-0"
//#define _USE_MCP79410 "i2c-0"
//#define _USE_TCN75A "i2c-0"
//#define _USE_SSD1331 &lcd_UG9664HDDAG01_LANDSCAPE, (string)"spi-0.0", (string)"pc1", (string)"pc13", (string)"pb13", (string)"pb12"
#define _USE_SSD1306 &lcd_UG2832HSWEG04_LANDSCAPE, (string)"spi-0.0", (string)"oled-dc", (string)"oled-res"
//#define _USE_LCD_FPGA &lcd_fpga_1440_900_60_display_106_00_mhz, &FPGA_GFX_ACCELA
/* Need for update */
//#define _USE_MS5611 false
//#define _USE_MHC5883 false
//#define _USE_ADXL345 false
//#define _USE_SHT11 false
//#define _USE_SX150x false
//#define _USE_SRF02 false
//#define _USE_nRF25l01 false
#define _USE_INT_ADC false
#define USE_DRIVER_SEMAPHORE false
/* Debug */
#define MMCSD_DEBUG_EN false
#include <main_app.h>
#endif /* MAIN_H_ */
......@@ -22,7 +22,7 @@
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.755967309" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu" useByScannerDiscovery="false" value="fr.ac6.managedbuild.option.gnu.cross.fpu.fpv4-sp-d16" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.1731662906" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi" useByScannerDiscovery="false" value="fr.ac6.managedbuild.option.gnu.cross.floatabi.hard" valueType="enumerated"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.2110018076" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/ExampleSTM32F407_Mikromedia}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.1541047198" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
<builder buildPath="${workspace_loc:/ExampleSTM32F407_Mikromedia}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.1541047198" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
<tool command="gcc -x c++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1559183829" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.2136041439" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.debug" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.2114058797" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
......@@ -91,7 +91,7 @@
<fileInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1888910454.1058603589" name="qspi_def.h" rcbsApplicability="disable" resourcePath="stm32f4/interface/qspi_def.h" toolsToInvoke=""/>
<fileInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1888910454.113086878" name="usb_dev_com_interface.h" rcbsApplicability="disable" resourcePath="stm32f4/interface/usb_dev_com_interface.h" toolsToInvoke=""/>
<sourceEntries>
<entry excluding="lib/board/TI|lib/board/NXP|lib/board/ATMEL|lib/board/STM/STM32F769I-DISCO|lib/board/STM/STM32F469I-DISCO|lib/board/STM/STM32F429I-DISCO|stm32f4/interface/LwIp/src/apps|stm32f4/interface/usbh_msc.h|stm32f4/interface/usbh_msc.cpp|stm32f4/interface/usbh_msc_def.h|stm32f4/interface/usb_host_mouse_interface.h|stm32f4/interface/usb_host_mouse_interface.c|stm32f4/interface/usb_dev_msc_interface.h|stm32f4/interface/usb_dev_msc_interface.c|stm32f4/interface/usb_dev_com_interface.h|stm32f4/interface/usb_dev_com_interface.c|stm32f4/interface/qspi.h|stm32f4/interface/qspi.c|stm32f4/interface/qspi_def.h|stm32f4/interface/int_rtc.h|stm32f4/interface/int_rtc.c|stm32f4/interface/i2s_interface.h|stm32f4/interface/i2s_interface.c|stm32f4/interface/adc_interface.h|stm32f4/interface/adc_interface.c|stm32f4/interface/adc_def.h|stm32f4/sys/startup_stm32f479xx.s|stm32f4/sys/startup_stm32f469xx.s|stm32f4/sys/startup_stm32f446xx.s|stm32f4/sys/startup_stm32f439xx.s|stm32f4/sys/startup_stm32f437xx.s|stm32f4/sys/startup_stm32f429xx.s|stm32f4/sys/startup_stm32f427xx.s|stm32f4/sys/startup_stm32f417xx.s|stm32f4/sys/startup_stm32f415xx.s|stm32f4/sys/startup_stm32f411xe.s|stm32f4/sys/startup_stm32f410tx.s|stm32f4/sys/startup_stm32f410rx.s|stm32f4/sys/startup_stm32f410cx.s|stm32f4/sys/startup_stm32f405xx.s|stm32f4/sys/startup_stm32f401xe.s|stm32f4/sys/startup_stm32f401xc.s" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="lib/device/lcd_fpga.h|lib/device/lcd_fpga.cpp|lib/board/TI|lib/board/NXP|lib/board/ATMEL|lib/board/STM/STM32F769I-DISCO|lib/board/STM/STM32F469I-DISCO|lib/board/STM/STM32F429I-DISCO|stm32f4/interface/LwIp/src/apps|stm32f4/interface/usbh_msc.h|stm32f4/interface/usbh_msc.cpp|stm32f4/interface/usbh_msc_def.h|stm32f4/interface/usb_host_mouse_interface.h|stm32f4/interface/usb_host_mouse_interface.c|stm32f4/interface/usb_dev_msc_interface.h|stm32f4/interface/usb_dev_msc_interface.c|stm32f4/interface/usb_dev_com_interface.h|stm32f4/interface/usb_dev_com_interface.c|stm32f4/interface/qspi.h|stm32f4/interface/qspi.c|stm32f4/interface/qspi_def.h|stm32f4/interface/int_rtc.h|stm32f4/interface/int_rtc.c|stm32f4/interface/i2s_interface.h|stm32f4/interface/i2s_interface.c|stm32f4/interface/adc_interface.h|stm32f4/interface/adc_interface.c|stm32f4/interface/adc_def.h|stm32f4/sys/startup_stm32f479xx.s|stm32f4/sys/startup_stm32f469xx.s|stm32f4/sys/startup_stm32f446xx.s|stm32f4/sys/startup_stm32f439xx.s|stm32f4/sys/startup_stm32f437xx.s|stm32f4/sys/startup_stm32f429xx.s|stm32f4/sys/startup_stm32f427xx.s|stm32f4/sys/startup_stm32f417xx.s|stm32f4/sys/startup_stm32f415xx.s|stm32f4/sys/startup_stm32f411xe.s|stm32f4/sys/startup_stm32f410tx.s|stm32f4/sys/startup_stm32f410rx.s|stm32f4/sys/startup_stm32f410cx.s|stm32f4/sys/startup_stm32f405xx.s|stm32f4/sys/startup_stm32f401xe.s|stm32f4/sys/startup_stm32f401xc.s" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
......@@ -169,7 +169,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="lib/board/TI|lib/board/NXP|lib/board/ATMEL|lib/board/STM/STM32F769I-DISCO|lib/board/STM/STM32F469I-DISCO|lib/board/STM/STM32F429I-DISCO|stm32f4/interface/LwIp/src/apps|stm32f4/sys/startup_stm32f479xx.s|stm32f4/sys/startup_stm32f469xx.s|stm32f4/sys/startup_stm32f446xx.s|stm32f4/sys/startup_stm32f439xx.s|stm32f4/sys/startup_stm32f437xx.s|stm32f4/sys/startup_stm32f429xx.s|stm32f4/sys/startup_stm32f427xx.s|stm32f4/sys/startup_stm32f417xx.s|stm32f4/sys/startup_stm32f415xx.s|stm32f4/sys/startup_stm32f411xe.s|stm32f4/sys/startup_stm32f410tx.s|stm32f4/sys/startup_stm32f410rx.s|stm32f4/sys/startup_stm32f410cx.s|stm32f4/sys/startup_stm32f405xx.s|stm32f4/sys/startup_stm32f401xe.s|stm32f4/sys/startup_stm32f401xc.s" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="lib/device/lcd_fpga.cpp|lib/board/TI|lib/board/NXP|lib/board/ATMEL|lib/board/STM/STM32F769I-DISCO|lib/board/STM/STM32F469I-DISCO|lib/board/STM/STM32F429I-DISCO|stm32f4/interface/LwIp/src/apps|stm32f4/sys/startup_stm32f479xx.s|stm32f4/sys/startup_stm32f469xx.s|stm32f4/sys/startup_stm32f446xx.s|stm32f4/sys/startup_stm32f439xx.s|stm32f4/sys/startup_stm32f437xx.s|stm32f4/sys/startup_stm32f429xx.s|stm32f4/sys/startup_stm32f427xx.s|stm32f4/sys/startup_stm32f417xx.s|stm32f4/sys/startup_stm32f415xx.s|stm32f4/sys/startup_stm32f411xe.s|stm32f4/sys/startup_stm32f410tx.s|stm32f4/sys/startup_stm32f410rx.s|stm32f4/sys/startup_stm32f410cx.s|stm32f4/sys/startup_stm32f405xx.s|stm32f4/sys/startup_stm32f401xe.s|stm32f4/sys/startup_stm32f401xc.s" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
......
......@@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="117439957937953287" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="159533552240273287" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
......@@ -16,7 +16,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="102487420170980627" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="176613027277293459" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
......
......@@ -29,7 +29,7 @@
</outputEntries>
</builder>
<tool command="gcc -x c++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1949162870" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.465276143" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.debug" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.465276143" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.size" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.321839545" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.886181820" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="C:/GitHub/MULTIPLATFORM-CPP-SDK/ExampleSTM32F429I_Disco"/>
......@@ -48,7 +48,7 @@
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.1341594808" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.2086423166" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1196297532" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.debug" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1196297532" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.size" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.1446383048" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.68426183" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="C:/GitHub/MULTIPLATFORM-CPP-SDK/ExampleSTM32F429I_Disco"/>
......
......@@ -5,8 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="117439957937953287" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-918909751776380975" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
......@@ -17,8 +16,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="102487420170980627" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-901830276739360803" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
......
......@@ -12,8 +12,8 @@
<targetDefinitions>
<board id="stm32f429i-disco">
<name>STM32F429I-DISCO</name>
<dbgIF>SWD</dbgIF>
<dbgIF>JTAG</dbgIF>
<dbgIF>SWD</dbgIF>
<dbgDEV>ST-Link</dbgDEV>
<mcuId>stm32f429zitx</mcuId>
</board>
......
......@@ -7,6 +7,7 @@
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
......
......@@ -31,7 +31,6 @@
#include "interface/screen.h"
#include <device/ssd1306.h>
#include <device/st7565.h>
#include <device/lcd_fpga.h>
#include "interface/screen_def.h"
#if (USE_LWIP == 1)
......
/*
* defs.cpp
*/
#if defined(RiscV_FPGA)
#if __AVR_XMEGA__
#include <avr/pgmspace.h>
#endif
#include "defs.h"
#include <stdio.h>
#include <api/gpio.h>
#include <api/spi.h>
#include <api/i2c.h>
#include <api/uart.h>
ioSetCfgGpio(push_0, "phbtn-0", pin_mux_convert_to_pin(IOA, 0),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(push_1, "phbtn-1", pin_mux_convert_to_pin(IOA, 1),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(push_2, "phbtn-2", pin_mux_convert_to_pin(IOA, 2),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(push_3, "phbtn-3", pin_mux_convert_to_pin(IOA, 3),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(push_4, "phbtn-4", pin_mux_convert_to_pin(IOA, 4),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(sw_0, "hbtn-0", pin_mux_convert_to_pin(IOB, 0),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(sw_1, "hbtn-1", pin_mux_convert_to_pin(IOB, 1),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(sw_2, "hbtn-2", pin_mux_convert_to_pin(IOB, 2),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(sw_3, "hbtn-3", pin_mux_convert_to_pin(IOB, 3),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(sw_4, "hbtn-4", pin_mux_convert_to_pin(IOB, 4),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(sw_5, "hbtn-5", pin_mux_convert_to_pin(IOB, 5),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(sw_6, "hbtn-6", pin_mux_convert_to_pin(IOB, 6),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(sw_7, "hbtn-7", pin_mux_convert_to_pin(IOB, 7),CfgGpio::GPIO_IN_FLOATING, false, false, 0);
ioSetCfgGpio(led_0, "led-0", pin_mux_convert_to_pin(IOC, 0),CfgGpio::GPIO_OUT_PUSH_PULL, false, false, 0);
ioSetCfgGpio(led_1, "led-1", pin_mux_convert_to_pin(IOC, 1),CfgGpio::GPIO_OUT_PUSH_PULL, false, false, 0);
ioSetCfgGpio(led_2, "led-2", pin_mux_convert_to_pin(IOC, 2),CfgGpio::GPIO_OUT_PUSH_PULL, false, false, 0);
ioSetCfgGpio(led_3, "led-3", pin_mux_convert_to_pin(IOC, 3),CfgGpio::GPIO_OUT_PUSH_PULL, false, false, 0);
ioSetCfgGpio(led_4, "led-4", pin_mux_convert_to_pin(IOC, 4),CfgGpio::GPIO_OUT_PUSH_PULL, false, false, 0);
ioSetCfgGpio(led_5, "led-5", pin_mux_convert_to_pin(IOC, 5),CfgGpio::GPIO_OUT_PUSH_PULL, false, false, 0);
ioSetCfgGpio(led_6, "led-6", pin_mux_convert_to_pin(IOC, 6),CfgGpio::GPIO_OUT_PUSH_PULL, false, false, 0);
ioSetCfgGpio(led_7, "led-7", pin_mux_convert_to_pin(IOC, 7),CfgGpio::GPIO_OUT_PUSH_PULL, false, false, 0);
ioSetCfgGpio(ug2832_dc, "oled-dc", pin_mux_convert_to_pin(IOG, 0),CfgGpio::GPIO_OUT_PUSH_PULL, false, false, 0);
ioSetCfgGpio(ug2832_rst, "oled-res", pin_mux_convert_to_pin(IOG, 1),CfgGpio::GPIO_OUT_PUSH_PULL, false, false, 1);
ioSetCfgGpio(ug2832_vbat, "oled-vba", pin_mux_convert_to_pin(IOG, 2),CfgGpio::GPIO_OUT_PUSH_PULL, false, false, 0);
ioSetCfgGpio(ug2832_vdd, "oled-vdd", pin_mux_convert_to_pin(IOG, 3),CfgGpio::GPIO_OUT_PUSH_PULL, false, false, 0);
ioSetCfgUart(uart_0, "uart-0", pin_mux_convert_to_pin(IOA, 0) , pin_mux_convert_to_pin(IOA, 0) , 115200 , CfgUart::WORD_LEN_8 , CfgUart::STOP_BITS_ONE , CfgUart::PAR_NONE , CfgUart::MODE_ASYNC);
ioSetCfgI2c(i2c_0, "i2c-0", pin_mux_convert_to_pin(IOA, 0), pin_mux_convert_to_pin(IOA, 0), 1000000);
ioSetCfgSpi(spi_0_0, "spi-0.0", pin_mux_convert_to_pin(IOA, 0), pin_mux_convert_to_pin(IOA, 0), pin_mux_convert_to_pin(IOA, 0), pin_mux_convert_to_pin(IOA, 0), CfgSpi::spiMode0, 15000000, false);
ioSetCfgEnd(ioTableEnd);
ioSettings *ioSetCfg[] = {
&push_0,
&push_1,
&push_2,
&push_3,
&push_4,
&sw_0,
&sw_1,
&sw_2,
&sw_3,
&sw_4,
&sw_5,
&sw_6,
&sw_7,
&led_0,
&led_1,
&led_2,
&led_3,
&led_4,
&led_5,
&led_6,
&led_7,
&ug2832_dc,
&ug2832_rst,
&ug2832_vbat,
&ug2832_vdd,
&uart_0,
&i2c_0,
&spi_0_0,
&ioTableEnd,
(ioSettings *)-1/* This is an artifice to force linker to put this structure ito .data section, to be sure that this will be initiated before the call of init() function. */
};
#endif/*!FRDM_KEAZ*/
#ifndef __RiscV_FPGA__
#define __RiscV_FPGA__
#if defined(RiscV_FPGA)
#include <include/global.h>
#include "ffconf.h"
#include "lwipopts.h"
#include "xio.h"
#include <io_defs.h>
/*
* Processor clock selection.
*
* If EXTERNAL_CLOCK_VALUE id !0 the reference clock will be EXTERNAL_CLOCK_VALUE.
* If HSE_VALUE value is 0 the reference clock will be the HSI_VALUE.
*/
#define EXTERNAL_CLOCK_VALUE ((unsigned long)0000000) /*!< Value of the External clock in Hz*/
#define CORE_CLOCK_DEFAULT CPU_FREQ /*!< Value of the Processor default clock in Hz*/
/*
* Processor clock selection.
*/
/*
* Debug interface setup.
*/
//#define STD_OUT_PATH "uart-0"/* Is output is directed to serial port you need to provide the path of port */
//#define STD_OUT_PATH "SCREEN<Terminal>"/* If output is directed to screen, need a screen name to be displayed on caption. */
//#define STD_IN_PATH "UART:0"
//#define STD_ERR_PATH "UART:0"
/*
* !Debug interface setup.
*/
/*
* Screen settings
*/
#define SCREENS_COUNT 1
#define SCREEN_CONFIG_1 lcd_fpga_1440_900_60_display_106_00_mhz
#define USED_SCREEN_CONTROLLER_1 IntScreen
#define OTHER_SCREEN_1_PARAMS &FPGA_GFX_ACCELA
/*
* !Screen settings
*/
/*
* Touch screen settings