aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-06-19 21:42:40 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-07-04 10:11:02 -0400
commit20c597635650d6a0944f9b6e33c438508a0c691f (patch)
treebd2746f43e420ab1e5676539af76ce539d838e94
parentcc0969dd0539c7bcc89652a793d7ccfc0c3b0fcd (diff)
downloadkutter-20c597635650d6a0944f9b6e33c438508a0c691f.tar.gz
kutter-20c597635650d6a0944f9b6e33c438508a0c691f.tar.xz
kutter-20c597635650d6a0944f9b6e33c438508a0c691f.zip
lib: Changes to rp2040 build files to work in Klipper build system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--lib/README4
-rw-r--r--lib/rp2040/boot_stage2/boot2_w25q080.S2
-rw-r--r--lib/rp2040/hardware/address_mapped.h4
-rw-r--r--lib/rp2040/rp2040.patch28
4 files changed, 35 insertions, 3 deletions
diff --git a/lib/README b/lib/README
index adaeebc3..ed36ab6e 100644
--- a/lib/README
+++ b/lib/README
@@ -56,7 +56,9 @@ version 1.24.0 (extracted 20190723).
The rp2040 directory contains code from the pico sdk:
https://github.com/raspberrypi/pico-sdk.git
-version 1.2.0 (bfcbefafc5d2a210551a4d9d80b4303d4ae0adf7).
+version 1.2.0 (bfcbefafc5d2a210551a4d9d80b4303d4ae0adf7). It has been
+modified so that it can build outside of the pico sdk. See
+rp2040.patch for the modifications.
The hub-ctrl directory contains code from:
https://github.com/codazoda/hub-ctrl.c/
diff --git a/lib/rp2040/boot_stage2/boot2_w25q080.S b/lib/rp2040/boot_stage2/boot2_w25q080.S
index ad3238e2..8fb3def4 100644
--- a/lib/rp2040/boot_stage2/boot2_w25q080.S
+++ b/lib/rp2040/boot_stage2/boot2_w25q080.S
@@ -26,7 +26,7 @@
// 4-byte checksum. Therefore code size cannot exceed 252 bytes.
// ----------------------------------------------------------------------------
-#include "pico/asm_helper.S"
+//#include "pico/asm_helper.S"
#include "hardware/regs/addressmap.h"
#include "hardware/regs/ssi.h"
#include "hardware/regs/pads_qspi.h"
diff --git a/lib/rp2040/hardware/address_mapped.h b/lib/rp2040/hardware/address_mapped.h
index b58f1e50..d651f598 100644
--- a/lib/rp2040/hardware/address_mapped.h
+++ b/lib/rp2040/hardware/address_mapped.h
@@ -7,7 +7,9 @@
#ifndef _HARDWARE_ADDRESS_MAPPED_H
#define _HARDWARE_ADDRESS_MAPPED_H
-#include "pico.h"
+//#include "pico.h"
+#define __force_inline inline
+#define static_assert(a,b)
#include "hardware/regs/addressmap.h"
/** \file address_mapped.h
diff --git a/lib/rp2040/rp2040.patch b/lib/rp2040/rp2040.patch
new file mode 100644
index 00000000..0aa24bd5
--- /dev/null
+++ b/lib/rp2040/rp2040.patch
@@ -0,0 +1,28 @@
+diff --git a/lib/rp2040/boot_stage2/boot2_w25q080.S b/lib/rp2040/boot_stage2/boot2_w25q080.S
+index ad3238e2..8fb3def4 100644
+--- a/lib/rp2040/boot_stage2/boot2_w25q080.S
++++ b/lib/rp2040/boot_stage2/boot2_w25q080.S
+@@ -26,7 +26,7 @@
+ // 4-byte checksum. Therefore code size cannot exceed 252 bytes.
+ // ----------------------------------------------------------------------------
+
+-#include "pico/asm_helper.S"
++//#include "pico/asm_helper.S"
+ #include "hardware/regs/addressmap.h"
+ #include "hardware/regs/ssi.h"
+ #include "hardware/regs/pads_qspi.h"
+diff --git a/lib/rp2040/hardware/address_mapped.h b/lib/rp2040/hardware/address_mapped.h
+index b58f1e50..d651f598 100644
+--- a/lib/rp2040/hardware/address_mapped.h
++++ b/lib/rp2040/hardware/address_mapped.h
+@@ -7,7 +7,9 @@
+ #ifndef _HARDWARE_ADDRESS_MAPPED_H
+ #define _HARDWARE_ADDRESS_MAPPED_H
+
+-#include "pico.h"
++//#include "pico.h"
++#define __force_inline inline
++#define static_assert(a,b)
+ #include "hardware/regs/addressmap.h"
+
+ /** \file address_mapped.h