fix minor syntax bugs
This commit is contained in:
parent
5191bd83a7
commit
1a600c2409
8
.vscode/tasks.json
vendored
8
.vscode/tasks.json
vendored
@ -4,7 +4,7 @@
|
|||||||
{
|
{
|
||||||
"label": "Initialize QEMU Build Directory",
|
"label": "Initialize QEMU Build Directory",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "mkdir -p ${BFBUILD_QEMU} && cd ${BFBUILD_QEMU} && ${BFAOS}/hake/hake.sh -s ${BFAOS} && make -j7 QEMU",
|
"command": "source ${HOME}/envvars.sh && mkdir -p ${BFBUILD_QEMU} && cd ${BFBUILD_QEMU} && ${BFAOS}/hake/hake.sh -s ${BFAOS} && make -j7 QEMU",
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
@ -13,7 +13,7 @@
|
|||||||
{
|
{
|
||||||
"label": "Build and Run QEMU",
|
"label": "Build and Run QEMU",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "cd ${BFBUILD_QEMU} && make qemu_a57 | tee ${BFBUILD_QEMU}/full_output.log",
|
"command": "source ${HOME}/envvars.sh && cd ${BFBUILD_QEMU} && make qemu_a57 | tee ${BFBUILD_QEMU}/full_output.log",
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
@ -22,7 +22,7 @@
|
|||||||
{
|
{
|
||||||
"label": "Initialize Toradex Build Directory",
|
"label": "Initialize Toradex Build Directory",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "mkdir -p ${BFBUILD} && cd ${BFBUILD} && ${BFAOS}/hake/hake.sh -s ${BFAOS} -a armv8 && make -j7 QEMU",
|
"command": "source ${HOME}/envvars.sh && mkdir -p ${BFBUILD} && cd ${BFBUILD} && ${BFAOS}/hake/hake.sh -s ${BFAOS} -a armv8 && make -j7 QEMU",
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
@ -31,7 +31,7 @@
|
|||||||
{
|
{
|
||||||
"label": "Build and Run Toradex",
|
"label": "Build and Run Toradex",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "cd ${BFBUILD} && make -j7 imx8x && make usbboot_imx8x",
|
"command": "source ${HOME}/envvars.sh && cd ${BFBUILD} && make -j7 imx8x && make usbboot_imx8x",
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
|
|||||||
@ -14,6 +14,6 @@
|
|||||||
{
|
{
|
||||||
target = "shelly",
|
target = "shelly",
|
||||||
cFiles = [ "shelly.c" ],
|
cFiles = [ "shelly.c" ],
|
||||||
addLibraries = [ "lpuart" ]
|
addLibraries = [ "lpuart", "gic_dist" ]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -14,8 +14,9 @@
|
|||||||
#include <aos/inthandler.h>
|
#include <aos/inthandler.h>
|
||||||
#include "shelly.h"
|
#include "shelly.h"
|
||||||
|
|
||||||
|
__attribute__((__used__))
|
||||||
static void shelly_interrupt_handler(void * arg) {
|
static void shelly_interrupt_handler(void * arg) {
|
||||||
struct shelly_st shelly_s = (struct shelly_st) arg;
|
// struct shelly_st * shelly_s = (struct shelly_st *) arg;
|
||||||
debug_printf("[shelly_interrupt_handler]!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
debug_printf("[shelly_interrupt_handler]!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -38,7 +39,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
struct gic_dist_s * gic_s;
|
struct gic_dist_s * gic_s;
|
||||||
//TODO: map gic space
|
//TODO: map gic space
|
||||||
err = gic_dist_init(gic_s, NULL);
|
err = gic_dist_init(&gic_s, NULL);
|
||||||
if (err_is_fail(err)) USER_PANIC_ERR(err, "couln't init gic_dist interrupts");
|
if (err_is_fail(err)) USER_PANIC_ERR(err, "couln't init gic_dist interrupts");
|
||||||
|
|
||||||
struct lpuart_s * uart_s;
|
struct lpuart_s * uart_s;
|
||||||
@ -51,10 +52,10 @@ int main(int argc, char *argv[])
|
|||||||
err = inthandler_alloc_dest_irq_cap(IMX8X_UART3_INT, &inter_cap);
|
err = inthandler_alloc_dest_irq_cap(IMX8X_UART3_INT, &inter_cap);
|
||||||
if (err_is_fail(err)) USER_PANIC_ERR(err, "couln't alloc dest cap");
|
if (err_is_fail(err)) USER_PANIC_ERR(err, "couln't alloc dest cap");
|
||||||
|
|
||||||
struct waitset ws = get_default_waitset()
|
struct waitset * ws = get_default_waitset();
|
||||||
// waitset_init(&ws);
|
// waitset_init(&ws);
|
||||||
|
|
||||||
err = inthandler_setup(inter_cap, &ws, MKCLOSURE(shelly_interrupt_handler, shelly_s));
|
err = inthandler_setup(inter_cap, ws, MKCLOSURE(shelly_interrupt_handler, (void *) &shelly_s));
|
||||||
if (err_is_fail(err)) USER_PANIC_ERR(err, "couln't setup interrupt handler");
|
if (err_is_fail(err)) USER_PANIC_ERR(err, "couln't setup interrupt handler");
|
||||||
|
|
||||||
err = gic_dist_enable_interrupt(gic_s, IMX8X_UART3_INT, 0b11111111, 0);
|
err = gic_dist_enable_interrupt(gic_s, IMX8X_UART3_INT, 0b11111111, 0);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user