Commit 039ffb90 authored by Theodor Bauer's avatar Theodor Bauer
Browse files

resolved

parents c8d8e9ff f548aca1
Subproject commit bc09981af73d78d15ab244d8fc9a8b3712086519
Subproject commit 0cf055f99eab270a6f03a138115f07a471797f91
#
# Automatically generated file; DO NOT EDIT.
# FreeRTOS Configuration
#
#
# Architecture Settings
#
# CONFIG_ARCH_ARM is not set
# CONFIG_ARCH_X86 is not set
CONFIG_ARCH_C2000=y
#
# Global Settings
#
CONFIG_CPU_CLOCK_BY_INTERFACE=y
# CONFIG_CPU_CLOCK_BY_DEFINE is not set
#
# Architecture Settings
#
CONFIG_ARCH_INCLUDE="-Iarch/c2000/c28x -Iarch/c2000/include -I$(shell dirname $(shell which $(CC)))/../include"
CONFIG_ARCH_CFLAGS=""
CONFIG_ARCH_AFLAGS=""
CONFIG_ARCH_LDFLAGS=""
CONFIG_ARCH_C2000_C28x=y
#
# C2000 C28x DSP Settings
#
#
# Mach Settings
#
CONFIG_MACH_C28X=y
CONFIG_MACH_INIT_STACK_SIZE=700
CONFIG_MACH_INCLUDE="-Imach/c28x/include"
CONFIG_MACH_DEFINE_HEAP=y
CONFIG_MACH_HAS_UART=y
CONFIG_MACH_HAS_TIMER=y
CONFIG_MACH_LIBS="-lrts2800_ml.lib mach/c28x/F28069F.cmd"
CONFIG_EXTRA_MACH_LINKFLAGS="-z -i$(shell dirname $(shell which $(CC)))/../lib --disable_auto_rts --priority --reread_libs --diag_suppress=16002 --diag_suppress=10063-D --xml_link_info='projekt_linkInfo.xml' --entry_point=code_start --rom_model --warn_sections --stack_size=$(CONFIG_MACH_INIT_STACK_SIZE) -heap=$(CONFIG_MACH_HEAP_SIZE)"
#
# NXP S32K Settings
#
CONFIG_MACH_HEAP_SIZE=100
#
# Clock Configuation
#
CONFIG_MACH_C28X_CLOCK_LOPCP_BY_4=y
# CONFIG_MACH_C28X_CLOCK_LOPCP_BY_1 is not set
# CONFIG_MACH_C28X_CLOCK_LOPCP_BY_2 is not set
CONFIG_MACH_C28X_OSCILLATOR_SPEED=20000000
CONFIG_MACH_C28X_PLL_MULL=18
# CONFIG_MACH_C28X_PLL_DIV_BY_1 is not set
# CONFIG_MACH_C28X_PLL_DIV_BY_2 is not set
CONFIG_MACH_C28X_PLL_DIV_BY_4=y
#
# GPIO Subsystem
#
CONFIG_MACH_C28x_GPIO=y
CONFIG_MACH_C28X_GPIO_PINS=2
CONFIG_MACH_C28X_RAM_DMA_OFF=y
# CONFIG_MACH_C28X_RAM_DMA_4 is not set
# CONFIG_MACH_C28X_RAM_DMA_1 is not set
CONFIG_MACH_C28X_SCI=y
CONFIG_MACH_C28X_SCI0=y
CONFIG_MACH_C28X_SCI0_GPIO_28=y
# CONFIG_MACH_C28X_SCI0_GPIO_7 is not set
CONFIG_MACH_C28X_SCI0_GPIO_12=y
# CONFIG_MACH_C28X_SCI0_GPIO_29 is not set
# CONFIG_MACH_C28X_SCI1 is not set
CONFIG_MACH_C28X_CPU_TIMER=y
# CONFIG_MACH_C28X_CPU_TIMER0 is not set
# CONFIG_MACH_C28X_CPU_TIMER1 is not set
CONFIG_MACH_C28X_CPU_TIMER2=y
#
# Driver
#
#
# Generic Driver Settings
#
# CONFIG_INSTANCE_NAME is not set
CONFIG_USE_STATIC=y
# CONFIG_GEN_VERSION is not set
# CONFIG_GCC is not set
CONFIG_GPIO=y
# CONFIG_GPIO_MULTI is not set
CONFIG_UART=y
CONFIG_UART_GENERIC_STRING=y
CONFIG_UART_GENERIC_BYTE=y
# CONFIG_UART_THREAD_SAVE is not set
# CONFIG_UART_MULTI is not set
# CONFIG_SENSOR is not set
# CONFIG_ADC is not set
# CONFIG_POWER is not set
CONFIG_TIMER=y
# CONFIG_TIMER_MULTI is not set
# CONFIG_PWM is not set
# CONFIG_EXAMPLE is not set
# CONFIG_NLIBC is not set
# CONFIG_RPROC is not set
# CONFIG_COUNTER is not set
# CONFIG_RTC is not set
# CONFIG_I2C is not set
#
# FreeRTOS
#
#
# Basic Settings
#
CONFIG_SUPPORT_STATIC_ALLOCATION=y
# CONFIG_SUPPORT_DYNAMIC_ALLOCATION is not set
CONFIG_SUPPORT_DYNAMIC_ALLOCATION_DISABLED=y
# CONFIG_INCLUDE_USER_FREERTOS_CONFIG is not set
CONFIG_ASSERT_DEFAULT=y
# CONFIG_ASSERT_DEFAULT_PRINT is not set
# CONFIG_ASSERT_USER_DEFINED is not set
# CONFIG_ASSERT_DISABLED is not set
# CONFIG_USE_16_BIT_TICKS is not set
CONFIG_TICK_RATE_HZ=1000
# CONFIG_USE_TRACE_FACILITY is not set
# CONFIG_USE_LIST_DATA_INTEGRITY_CHECK_BYTES is not set
# CONFIG_USE_ALTERNATIVE_API is not set
#
# Task Setting
#
CONFIG_MAX_PRIORITIES=5
CONFIG_MINIMAL_STACK_SIZE=128
CONFIG_MAX_TASK_NAME_LEN=16
CONFIG_NUM_THREAD_LOCAL_STORAGE_POINTERS=0
# CONFIG_USE_IDLE_HOOK is not set
# CONFIG_USE_DAEMON_TASK_STARTUP_HOOK is not set
CONFIG_INCLUDE_vTaskSuspend=y
# CONFIG_INCLUDE_xTaskResumeFromISR is not set
CONFIG_USE_PREEMPTION=y
CONFIG_USE_TIME_SLICING=y
CONFIG_IDLE_SHOULD_YIELD=y
# CONFIG_USE_APPLICATION_TASK_TAG is not set
# CONFIG_USE_TASK_NOTIFICATIONS is not set
# CONFIG_CHECK_STACK_OVERFLOW is not set
# CONFIG_RECORD_STACK_HIGH_ADDRESS is not set
# CONFIG_USE_TICK_HOOK is not set
CONFIG_STACK_DEPTH_TYPE_16BIT=y
# CONFIG_STACK_DEPTH_TYPE_32BIT is not set
CONFIG_INITIAL_TICK_COUNT=0
# CONFIG_USE_POSIX_ERRNO is not set
#
# Function Support
#
# CONFIG_INCLUDE_vTaskDelete is not set
# CONFIG_INCLUDE_xTaskGetIdleTaskHandle is not set
CONFIG_INCLUDE_vTaskDelay=y
CONFIG_INCLUDE_vTaskDelayUntil=y
# CONFIG_INCLUDE_eTaskGetState is not set
# CONFIG_INCLUDE_uxTaskPriorityGet is not set
# CONFIG_INCLUDE_vTaskPrioritySet is not set
# CONFIG_INCLUDE_pcTaskGetTaskName is not set
# CONFIG_INCLUDE_xTaskGetSchedulerState is not set
# CONFIG_INCLUDE_xTaskGetHandle is not set
# CONFIG_INCLUDE_xTaskGetCurrentTaskHandle is not set
# CONFIG_INCLUDE_FREERTOS_TASK_C_ADDITIONS_H is not set
# CONFIG_INCLUDE_xTaskAbortDelay is not set
#
# Queue Settings
#
# CONFIG_USE_QUEUE_SETS is not set
CONFIG_QUEUE_REGISTRY_SIZE=0
# CONFIG_USE_MUTEXES is not set
# CONFIG_USE_COUNTING_SEMAPHORES is not set
# CONFIG_USE_TIMERS is not set
# CONFIG_USE_CO_ROUTINES is not set
#
# Compiler Settings
#
CONFIG_CROSS_COMPILE="c2000-"
CONFIG_DEBUG=y
CONFIG_OPTIMIZATION_O0=y
# CONFIG_OPTIMIZATION_O1 is not set
# CONFIG_OPTIMIZATION_O2 is not set
# CONFIG_OPTIMIZATION_O3 is not set
# CONFIG_OPTIMIZATION_Ofast is not set
# CONFIG_OPTIMIZATION_Os is not set
# CONFIG_REMOVE_UNUSED_SECTIONS is not set
# CONFIG_USER_ERROR_FUNCTION is not set
CONFIG_EXTRA_AFLAGS=""
CONFIG_EXTRA_CFLAGS=""
CONFIG_EXTRA_CPPFLAGS=""
CONFIG_EXTRA_LDFLAGS=""
Subproject commit 1aca361668e4da5ffaa4fa5f231af86f9efa65c2
Subproject commit e76a04da27c89fb1f768ceefc1936ce1fbcff01b
Subproject commit f0872d65798836a89e9f0778de76539a09ecabb8
Subproject commit 08540af9c33d4f656f9f19073b0a1e41a5c7d876
Subproject commit 6fea94489428a5b9c9009bcdf993b92c3800ba78
Subproject commit 9d15e79b0da3aedfff9a7e8f108dac9c2ec995a2
......@@ -4,3 +4,4 @@ obj-$(CONFIG_MACH_IMX6) += imx6/
obj-$(CONFIG_MACH_AM57xx) += am57xx/
obj-$(CONFIG_MACH_LINUX) += linux/
obj-$(CONFIG_MACH_S32K) += s32k/
obj-$(CONFIG_MACH_C28X) += c28x/
obj-y += test.o
/* SPDX-License-Identifier: MIT */
/*
* Author: Andreas Werner <kernel@andy89.org>
* Date: 2016
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <FreeRTOS.h>
#include <task.h>
#include <file.h>
#include <uart.h>
#include <devs.h>
#include <irq.h>
# define PRINTF(...) printf(__VA_ARGS__)
#include <gpio.h>
#include <iomux.h>
void vApplicationMallocFailedHook( void ) {
CONFIG_ASSERT(0);
}
void vApplicationTickHook() {
}
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName ) {
CONFIG_ASSERT(0);
}
void vApplicationIdleHook( void ) {
}
void userErrorHandler(void) {
}
struct uart *stdio;
int stdio_dopen(const char *path, unsigned flags, int llv_fd) {
return 0;
}
int stdio_dclose(int dev_fd) {
return 0;
}
int stdio_dread(int dev_fd, char *buf, unsigned count) {
return uart_read(stdio, buf, count, portMAX_DELAY);
}
int stdio_dwrite(int dev_fd, const char *buf, unsigned count) {
int32_t ret;
int i = 0;
for (i = 0; i < count; i++) {
if (*buf == '\n') {
ret = uart_putc(stdio, '\r', portMAX_DELAY);
if (ret < 0) {
return -1;
}
}
ret = uart_putc(stdio, *buf, portMAX_DELAY);
if (ret < 0) {
return -1;
}
buf++;
}
return i;
}
off_t stdio_dlseek(int dev_fd, off_t offset, int origin) {
return 0;
}
int stdio_dunlink(const char *path) {
return 0;
}
int stdio_drename(const char *old_name, const char *new_name) {
return 0;
}
void testTask(void *data) {
struct gpio *gpio = gpio_init(GPIO_ID);
int i = 0;
struct gpio_pin *red = gpioPin_init(gpio, GPIO_50, GPIO_OUTPUT, GPIO_PULL_UP);
struct gpio_pin *green = gpioPin_init(gpio, GPIO_29, GPIO_OUTPUT, GPIO_PULL_UP);
CONFIG_ASSERT(red);
CONFIG_ASSERT(green);
gpioPin_setPin(red);
gpioPin_clearPin(green);
TickType_t pxPreviousWakeTime = xTaskGetTickCount();
for (;;) {
gpioPin_togglePin(red);
gpioPin_togglePin(green);
PRINTF("%d %lu\n", i++, pxPreviousWakeTime);
vTaskDelayUntil(&pxPreviousWakeTime, 1000 / portTICK_PERIOD_MS);
}
}
OS_DEFINE_TASK(test, 500);
int main() {
int32_t ret;
ret = irq_init();
CONFIG_ASSERT(ret == 0);
stdio = uart_init(SCI0_ID, 115200);
CONFIG_ASSERT(stdio);
ret = add_device("uart", _SSA,
stdio_dopen,
stdio_dclose,
stdio_dread,
stdio_dwrite,
stdio_dlseek,
stdio_dunlink,
stdio_drename
);
CONFIG_ASSERT(ret >= 0);
FILE *fid = fopen("uart", "w");
freopen("uart:", "w", stdout);
setvbuf(stdout, NULL, _IONBF, 0);
ret = OS_CREATE_TASK(testTask, "Test Task", 500, NULL, 2, test);
CONFIG_ASSERT(ret == pdPASS);
PRINTF("Start Scheduler\n");
vTaskStartScheduler ();
for(;;);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment