mirror of
https://github.com/sipeed/Maixduino.git
synced 2026-03-03 09:04:00 +01:00
Add IOXGD4 board
This commit is contained in:
47
boards.txt
47
boards.txt
@@ -284,3 +284,50 @@ aiotdaan.upload.tool=kflash
|
||||
## Limit is the 16MB Flash. Assume half is used for something else.
|
||||
aiotdaan.upload.maximum_size=8388608
|
||||
aiotdaan.build.ldscript={runtime.platform.path}/cores/arduino/kendryte-standalone-sdk/lds/kendryte.ld
|
||||
|
||||
##################################################
|
||||
############# IOXGD4 ###############
|
||||
|
||||
ioxgd4.name=IOXGD4
|
||||
|
||||
## Toolchain
|
||||
ioxgd4.menu.toolsloc.default=Default
|
||||
ioxgd4.menu.toolsloc.default.compiler.path={runtime.tools.riscv64-unknown-elf-gcc.path}/bin/
|
||||
|
||||
## CPU Clock
|
||||
ioxgd4.menu.clksrc.400=400MHz CPU Clock Frequency
|
||||
ioxgd4.menu.clksrc.500=500MHz CPU Clock Frequency
|
||||
ioxgd4.menu.clksrc.600=600MHz CPU Clock Frequency
|
||||
ioxgd4.menu.clksrc.400.build.f_cpu=400000000L
|
||||
ioxgd4.menu.clksrc.500.build.f_cpu=500000000L
|
||||
ioxgd4.menu.clksrc.600.build.f_cpu=600000000L
|
||||
|
||||
## Burn baud rate
|
||||
ioxgd4.menu.burn_baudrate.2000000=2 Mbps
|
||||
ioxgd4.menu.burn_baudrate.1500000=1.5 Mbps
|
||||
ioxgd4.menu.burn_baudrate.1000000=1 Mbps
|
||||
ioxgd4.menu.burn_baudrate.2000000.build.burn_baudrate=2000000
|
||||
ioxgd4.menu.burn_baudrate.1500000.build.burn_baudrate=1500000
|
||||
ioxgd4.menu.burn_baudrate.1000000.build.burn_baudrate=1000000
|
||||
|
||||
## Burn tool firmware
|
||||
ioxgd4.menu.burn_tool_firmware.dan=Default
|
||||
ioxgd4.menu.burn_tool_firmware.dan.build.burn_tool_firmware=dan
|
||||
|
||||
## Point to the file for ./variants/<variant>/pins_arduino.h
|
||||
ioxgd4.build.variant=ioxgd4
|
||||
|
||||
## "The 'core' file directory for this board, in ./cores
|
||||
ioxgd4.build.core=arduino
|
||||
|
||||
## This sets a define for use in the compiled code.
|
||||
ioxgd4.build.board=BOARD_SIPEED_MAIX_ONE_DOCK
|
||||
ioxgd4.build.sdata.size=512
|
||||
|
||||
## This selects the tool from "programmers.txt"
|
||||
ioxgd4.program.tool=kflash
|
||||
ioxgd4.upload.tool=kflash
|
||||
|
||||
## Limit is the 16MB Flash. Assume half is used for something else.
|
||||
ioxgd4.upload.maximum_size=8388608
|
||||
ioxgd4.build.ldscript={runtime.platform.path}/cores/arduino/kendryte-standalone-sdk/lds/kendryte.ld
|
||||
|
||||
91
variants/ioxgd4/pins_arduino.h
Normal file
91
variants/ioxgd4/pins_arduino.h
Normal file
@@ -0,0 +1,91 @@
|
||||
#ifndef _VARIANT_IOXGD4
|
||||
#define _VARIANT_IOXGD4
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define RISCV
|
||||
#include "platform.h"
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "pwm.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include "UARTClass.h"
|
||||
extern class UARTHSClass Serial;
|
||||
extern class UARTClass Serial1;
|
||||
extern class UARTClass Serial2;
|
||||
extern class UARTClass Serial3;
|
||||
#endif
|
||||
|
||||
/* BOARD PIN DEFINE */
|
||||
/* LEDs */
|
||||
#define PIN_LED_GREEN 13
|
||||
#define PIN_LED_BLUE 12
|
||||
#define PIN_LED_RED 14
|
||||
#define PIN_LED 13
|
||||
#define LED_BUILTIN 13
|
||||
#define LED_GREEN 13
|
||||
#define LED_BLUE 12
|
||||
#define LED_RED 14
|
||||
/* KEY */
|
||||
#define KEY0 16
|
||||
/* MIC ARRAY */
|
||||
#define MIC_BCK 18
|
||||
#define MIC_WS 19
|
||||
#define MIC_DAT3 20
|
||||
#define MIC_DAT2 21
|
||||
#define MIC_DAT1 22
|
||||
#define MIC_DAT0 23
|
||||
#define MIC_LED_DAT 24
|
||||
/* SPI0 */
|
||||
#define SPI0_CS1 25
|
||||
#define SPI0_MISO 26
|
||||
#define SPI0_SCLK 27
|
||||
#define SPI0_MOSI 28
|
||||
#define SPI0_CS0 29
|
||||
/* I2S */
|
||||
#define MIC0_WS 30
|
||||
#define MIC0_DATA 31
|
||||
#define MIC0_BCK 32
|
||||
#define I2S_WS 33
|
||||
#define I2S_DA 34
|
||||
#define I2S_BCK 35
|
||||
/* LCD */
|
||||
#define LCD_CS 36
|
||||
#define LCD_RST 37
|
||||
#define LCD_DC 38
|
||||
#define LCD_WR 39
|
||||
|
||||
#define RX0 4
|
||||
#define TX0 5
|
||||
|
||||
#define RX1 6
|
||||
#define TX1 7
|
||||
|
||||
#define SDA 33
|
||||
#define SCL 32
|
||||
|
||||
#define MD_PIN_MAP(fpio) (fpio)
|
||||
#define ORG_PIN_MAP(org_pin) (org_pin)
|
||||
|
||||
static const uint8_t SS = SPI0_CS0 ;
|
||||
static const uint8_t MOSI = SPI0_MOSI;
|
||||
static const uint8_t MISO = SPI0_MISO;
|
||||
static const uint8_t SCK = SPI0_SCLK;
|
||||
|
||||
typedef struct _pwm_fpio_set_t{
|
||||
pwm_channel_number_t channel;
|
||||
pwm_device_number_t device;
|
||||
uint8_t inuse;
|
||||
}pwm_fpio_set_t;
|
||||
|
||||
|
||||
|
||||
#define VARIANT_NUM_GPIOHS (32)
|
||||
#define VARIANT_NUM_GPIO ( 8)
|
||||
#define VARIANT_NUM_PWM (12)
|
||||
#define VARIANT_NUM_I2C ( 3)
|
||||
#define VARIANT_NUM_SPI ( 3)
|
||||
#define VARIANT_NUM_UART ( 3)
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user