Skip to content

Commit

Permalink
PicoSystem: HACK: Static SCREEN. OC Early
Browse files Browse the repository at this point in the history
* Reduce gc_heap to 162*1024 to make room for PicoSystem's 120*120*2 SCREEN buffer
* Add overclock directly into MP main.c to avoid a clock change during startup/init (I think this is breaky)
  • Loading branch information
Gadgetoid committed Oct 21, 2021
1 parent 0f652d4 commit f826b9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ports/rp2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "hardware/structs/rosc.h"

extern uint8_t __StackTop, __StackBottom;
static char gc_heap[192 * 1024];
static char gc_heap[162 * 1024]; // Leave room for PicoSystem display buffer

// Embed version info in the binary in machine readable form
bi_decl(bi_program_version_string(MICROPY_GIT_TAG));
Expand All @@ -62,6 +62,8 @@ bi_decl(bi_program_feature_group_with_flags(BINARY_INFO_TAG_MICROPYTHON,
BI_NAMED_GROUP_SEPARATE_COMMAS | BI_NAMED_GROUP_SORT_ALPHA));

int main(int argc, char **argv) {
set_sys_clock_khz(250000, true);

#if MICROPY_HW_ENABLE_UART_REPL
bi_decl(bi_program_feature("UART REPL"))
setup_default_uart();
Expand Down

0 comments on commit f826b9e

Please sign in to comment.