mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
Reconstruct bl602 readme; move up_irq_save/restore declaration to common place
This commit is contained in:
@@ -224,8 +224,6 @@ extern "C"
|
|||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
EXTERN irqstate_t up_irq_save(void);
|
|
||||||
EXTERN void up_irq_restore(irqstate_t);
|
|
||||||
EXTERN irqstate_t up_irq_enable(void);
|
EXTERN irqstate_t up_irq_enable(void);
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
|
|||||||
@@ -426,9 +426,6 @@ void bl602_lowsetup(void)
|
|||||||
|
|
||||||
bl602_uart_configure(BL602_CONSOLE_BASE, &g_bl602_console_config);
|
bl602_uart_configure(BL602_CONSOLE_BASE, &g_bl602_console_config);
|
||||||
|
|
||||||
up_lowputc('A');
|
|
||||||
up_lowputc('\r');
|
|
||||||
up_lowputc('\n');
|
|
||||||
#endif /* HAVE_SERIAL_CONSOLE */
|
#endif /* HAVE_SERIAL_CONSOLE */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,27 +2,27 @@
|
|||||||
|
|
||||||
$ curl https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz
|
$ curl https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz
|
||||||
|
|
||||||
2. Follow instruction on https://github.com/enjoy-digital/litex to build the vexriscv softcore fpga gateware
|
2. Download Bouffalo lab flash tools
|
||||||
and flash to arty_a7 board
|
|
||||||
|
$ git clone https://github.com/bouffalo/flash_tools.git
|
||||||
|
|
||||||
3. Configure and build NuttX
|
3. Configure and build NuttX
|
||||||
|
|
||||||
$ mkdir ./nuttx; cd ./nuttx
|
$ mkdir ./nuttx; cd ./nuttx
|
||||||
$ git clone https://bitbucket.org/nuttx/nuttx.git
|
$ git clone https://github.com/apache/incubator-nuttx.git nuttx
|
||||||
$ git clone https://bitbucket.org/nuttx/apps.git
|
$ git clone https://github.com/apache/incubator-nuttx-apps.git apps
|
||||||
$ cd nuttx
|
$ cd nuttx
|
||||||
$ make distclean
|
$ make distclean
|
||||||
$ ./tools/configure.sh arty_a7:nsh
|
$ ./tools/configure.sh bl602evb:nsh
|
||||||
$ make V=1
|
$ make -j
|
||||||
|
|
||||||
4. Setup tftp server on your laptop, copy nuttx.bin to your tftpboot directory and change its name to boot.bin
|
4. Connect bl602 and computer via USB
|
||||||
|
|
||||||
5. Setup the wire connection(uart and tftp) between your board and laptop
|
5. Run flash tools, select the nuttx.bin generated in the previous step in the
|
||||||
|
Firmware bin field, and refer to the document for the settings of the remaining fields.
|
||||||
|
Click the download button to download bin to bl602.
|
||||||
|
|
||||||
6. Run $ minicom -b 1000000 /dev/ttyUSB1 (the default baudrate on litex vexriscv is 1e6)
|
6. Run $ picocom -b 115200 /dev/ttyUSB0 (If you see garbled characters at the begining, it is because
|
||||||
when you see the bios prompt "litex>", type "netboot" and enter soon comes the nsh prompt
|
boot2 outputs some log at 2M baud rate), then you will see "nuttx>" prompt.
|
||||||
|
|
||||||
7. TODO
|
How to download to bl602 can refer to the docs in the https://github.com/bouffalolab/bl_iot_sdk repository.
|
||||||
|
|
||||||
Support GPIO/SPI/I2C/RTC/WDT/PWM
|
|
||||||
Support RISC-V User mode
|
|
||||||
|
|||||||
@@ -81,6 +81,7 @@
|
|||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
|
|
||||||
#include <arch/arch.h>
|
#include <arch/arch.h>
|
||||||
|
#include <arch/types.h>
|
||||||
|
|
||||||
#include <nuttx/compiler.h>
|
#include <nuttx/compiler.h>
|
||||||
#include <nuttx/cache.h>
|
#include <nuttx/cache.h>
|
||||||
@@ -1353,6 +1354,39 @@ void up_irqinitialize(void);
|
|||||||
|
|
||||||
bool up_interrupt_context(void);
|
bool up_interrupt_context(void);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: up_irq_save
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Save the current interrupt state and disable interrupts.
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Interrupt state prior to disabling interrupts.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
irqstate_t up_irq_save(void);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: up_irq_restore
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Restore the previous irq state (i.e., the one previously
|
||||||
|
* returned by up_irq_save())
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* irqstate - The interrupt state to be restored.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void up_irq_restore(irqstate_t irqstate);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_enable_irq
|
* Name: up_enable_irq
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user