Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: platforms/stm/disco_dartino/src/dartino_entry.cc

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « platforms/stm/disco_dartino/src/dartino_entry.h ('k') | platforms/stm/disco_dartino/src/freertos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platforms/stm/disco_dartino/src/dartino_entry.cc
diff --git a/platforms/stm/disco_fletch/src/fletch_entry.cc b/platforms/stm/disco_dartino/src/dartino_entry.cc
similarity index 66%
rename from platforms/stm/disco_fletch/src/fletch_entry.cc
rename to platforms/stm/disco_dartino/src/dartino_entry.cc
index f6667d3aef2b59b2912a742b1ac03c5e7b7299b2..4166430a0c3be618ea9af1d950847d1cdfd0c857 100644
--- a/platforms/stm/disco_fletch/src/fletch_entry.cc
+++ b/platforms/stm/disco_dartino/src/dartino_entry.cc
@@ -11,12 +11,12 @@ extern "C" {
#include <stm32746g_discovery.h>
#include <stm32746g_discovery_lcd.h>
-#include "include/fletch_api.h"
+#include "include/dartino_api.h"
#include "include/static_ffi.h"
-#include "platforms/stm/disco_fletch/src/fletch_entry.h"
-#include "platforms/stm/disco_fletch/src/page_allocator.h"
-#include "platforms/stm/disco_fletch/src/uart.h"
+#include "platforms/stm/disco_dartino/src/dartino_entry.h"
+#include "platforms/stm/disco_dartino/src/page_allocator.h"
+#include "platforms/stm/disco_dartino/src/uart.h"
#include "src/shared/utils.h"
extern unsigned char _binary_snapshot_start;
@@ -46,37 +46,37 @@ extern "C" void LCDDrawLine(
extern "C" int Write(int file, char *ptr, int len) {
for (int i = 0; i < len; i++) {
if (file == 2) {
- fletch::Print::Error("%c", *ptr++);
+ dartino::Print::Error("%c", *ptr++);
} else {
- fletch::Print::Out("%c", *ptr++);
+ dartino::Print::Out("%c", *ptr++);
}
}
return len;
}
-FLETCH_EXPORT_TABLE_BEGIN
- FLETCH_EXPORT_TABLE_ENTRY("uart_read", UartRead)
- FLETCH_EXPORT_TABLE_ENTRY("uart_write", UartWrite)
- FLETCH_EXPORT_TABLE_ENTRY("lcd_height", BSP_LCD_GetYSize)
- FLETCH_EXPORT_TABLE_ENTRY("lcd_width", BSP_LCD_GetXSize)
- FLETCH_EXPORT_TABLE_ENTRY("lcd_clear", BSP_LCD_Clear)
- FLETCH_EXPORT_TABLE_ENTRY("lcd_draw_line", LCDDrawLine)
- FLETCH_EXPORT_TABLE_ENTRY("lcd_set_foreground_color", BSP_LCD_SetTextColor)
- FLETCH_EXPORT_TABLE_ENTRY("lcd_set_background_color", BSP_LCD_SetBackColor)
- FLETCH_EXPORT_TABLE_ENTRY("lcd_display_string", BSP_LCD_DisplayStringAt)
-FLETCH_EXPORT_TABLE_END
-
-// Run fletch on the linked in snapshot.
-void StartFletch(void const * argument) {
- fletch::Print::Out("Setup fletch\n");
- FletchSetup();
- fletch::Print::Out("Reading fletch snapshot\n");
+DARTINO_EXPORT_TABLE_BEGIN
+ DARTINO_EXPORT_TABLE_ENTRY("uart_read", UartRead)
+ DARTINO_EXPORT_TABLE_ENTRY("uart_write", UartWrite)
+ DARTINO_EXPORT_TABLE_ENTRY("lcd_height", BSP_LCD_GetYSize)
+ DARTINO_EXPORT_TABLE_ENTRY("lcd_width", BSP_LCD_GetXSize)
+ DARTINO_EXPORT_TABLE_ENTRY("lcd_clear", BSP_LCD_Clear)
+ DARTINO_EXPORT_TABLE_ENTRY("lcd_draw_line", LCDDrawLine)
+ DARTINO_EXPORT_TABLE_ENTRY("lcd_set_foreground_color", BSP_LCD_SetTextColor)
+ DARTINO_EXPORT_TABLE_ENTRY("lcd_set_background_color", BSP_LCD_SetBackColor)
+ DARTINO_EXPORT_TABLE_ENTRY("lcd_display_string", BSP_LCD_DisplayStringAt)
+DARTINO_EXPORT_TABLE_END
+
+// Run dartino on the linked in snapshot.
+void StartDartino(void const * argument) {
+ dartino::Print::Out("Setup dartino\n");
+ DartinoSetup();
+ dartino::Print::Out("Reading dartino snapshot\n");
unsigned char *snapshot = &_binary_snapshot_start;
int snapshot_size = reinterpret_cast<int>(&_binary_snapshot_size);
- FletchProgram program = FletchLoadSnapshot(snapshot, snapshot_size);
- fletch::Print::Out("Run fletch program\n");
- FletchRunMain(program);
- fletch::Print::Out("Fletch program exited\n");
+ DartinoProgram program = DartinoLoadSnapshot(snapshot, snapshot_size);
+ dartino::Print::Out("Run dartino program\n");
+ DartinoRunMain(program);
+ dartino::Print::Out("Dartino program exited\n");
}
void UartPrintIntercepter(const char* message, int out, void* data) {
@@ -106,7 +106,7 @@ void LCDPrintIntercepter(const char* message, int out, void* data) {
}
// Main task entry point from FreeRTOS.
-void FletchEntry(void const * argument) {
+void DartinoEntry(void const * argument) {
// Add an arena of the 8Mb of external memory.
uint32_t ext_mem_arena =
page_allocator->AddArena("ExtMem", 0xc0000000, 0x800000);
@@ -122,22 +122,22 @@ void FletchEntry(void const * argument) {
// Initialize LCD Log module.
LCD_LOG_Init();
- LCD_LOG_SetHeader(reinterpret_cast<uint8_t*>(const_cast<char*>("Fletch")));
+ LCD_LOG_SetHeader(reinterpret_cast<uint8_t*>(const_cast<char*>("Dartino")));
LCD_LOG_SetFooter(reinterpret_cast<uint8_t*>(const_cast<char*>(
"STM32746G-Discovery")));
- FletchRegisterPrintInterceptor(LCDPrintIntercepter, NULL);
+ DartinoRegisterPrintInterceptor(LCDPrintIntercepter, NULL);
// For now always start the UART.
uart = new Uart();
uart->Start();
- FletchRegisterPrintInterceptor(UartPrintIntercepter, NULL);
+ DartinoRegisterPrintInterceptor(UartPrintIntercepter, NULL);
// Always disable standard out, as this will cause infinite
// recursion in the syscalls.c handling of write.
- fletch::Print::DisableStandardOutput();
+ dartino::Print::DisableStandardOutput();
- StartFletch(argument);
+ StartDartino(argument);
// No more to do right now.
for (;;) {
« no previous file with comments | « platforms/stm/disco_dartino/src/dartino_entry.h ('k') | platforms/stm/disco_dartino/src/freertos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698