This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

add easy option to switch between UART and GPU output

Ivan Ilak (Aug 10, 2023, 7:01 PM +0200) 8db9586c 485fac48

+10 -2
+1
os/CMakeLists.txt
··· 31 31 target_include_directories(${KERNEL}.elf PUBLIC include) 32 32 target_link_libraries(${KERNEL}.elf PRIVATE common) 33 33 # target_link_libraries(${KERNEL}.elf PRIVATE utils) 34 + target_compile_definitions(${KERNEL}.elf PRIVATE UART_MODE=1) # Activate special mode where charater output gets redirected to UART_0 34 35 35 36 # Generates the binary with objcopy. 36 37 add_custom_command(
+4 -1
os/src/kernel/kerio.c
··· 9 9 10 10 void putc(char c) 11 11 { 12 + #if UART_MODE 13 + uart_putc(c); 14 + #else 12 15 gpu_putc(c); 13 - // uart_putc(c); 16 + #endif 14 17 } 15 18 16 19 void puts(const char *str)
+5 -1
os/src/kernel/kernel.c
··· 29 29 atags = 0x100; 30 30 31 31 mem_init((atag_t *)atags); 32 - // uart_init(); 32 + #if UART_MODE 33 + uart_init(); 34 + printf("ATTENTION YOU ARE IN UART MODE\n\n"); 35 + #else 33 36 gpu_init(); 37 + #endif 34 38 35 39 puts("Welcome to piOS!\n----------------\n\n"); 36 40