Skip to content

Commit

Permalink
Merge pull request #118 from hmllr/aideck_tutorial_own_code_v3
Browse files Browse the repository at this point in the history
Adds minimal gap8->CF hello world example for tutorial
  • Loading branch information
knmcguire authored Mar 3, 2023
2 parents bafca78 + b6398f7 commit d397115
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/other/hello_world_gap8/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
io=uart
PMSIS_OS = freertos

APP = hello_world_gap8
APP_SRCS += hello_world_gap8.c ../../../lib/cpx/src/com.c ../../../lib/cpx/src/cpx.c
APP_INC=../../../lib/cpx/inc
APP_CFLAGS += -O3 -g
APP_CFLAGS += -DconfigUSE_TIMERS=1 -DINCLUDE_xTimerPendFunctionCall=1

include $(RULES_DIR)/pmsis_rules.mk
44 changes: 44 additions & 0 deletions examples/other/hello_world_gap8/hello_world_gap8.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* ,---------, ____ _ __
* | ,-^-, | / __ )(_) /_______________ _____ ___
* | ( O ) | / __ / / __/ ___/ ___/ __ `/_ / / _ \
* | / ,--´ | / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
* +------` /_____/_/\__/\___/_/ \__,_/ /___/\___/
*
* AI-deck GAP8
*
* Copyright (C) 2022 Bitcraze AB
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, in version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Hello world example
*/
#include "pmsis.h"
#include "bsp/bsp.h"
#include "cpx.h"

void start_example(void)
{
pi_bsp_init();
cpxInit();
while (1)
{
cpxPrintToConsole(LOG_TO_CRTP, "Hello World\n");
pi_time_wait_us(1000*1000);
}
}

int main(void)
{
return pmsis_kickoff((void *)start_example);
}

0 comments on commit d397115

Please sign in to comment.