mirror of
https://github.com/andreili/katapult.git
synced 2025-08-23 19:34:06 +02:00
Synchronize with the latest Klipper code. This pulls in the latest lib/ files (needed to use the pico-sdk v2.0.0 version). It updates to latest can2040 code (needed for pico-sdk v2.0.0 support). It implements USB double buffering (as is now done in Klipper). It adds in support for additional UART pins (as is now done in Klipper). It adds support for rp2350 chips. This replaces the execute in ram code previously implemented in Katapult with the execute in ram code that is now standard in Klipper. The CONFIG_RP2040_ADD_BOOT_SIGNATURE kconfig symbol was removed and the build now always produces a katapult.withclear.uf2 file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
60 lines
1.1 KiB
C
60 lines
1.1 KiB
C
/*
|
|
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef _ELF_H
|
|
#define _ELF_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#define ELF_MAGIC 0x464c457fu
|
|
|
|
#define EM_ARM 0x28u
|
|
|
|
#define EF_ARM_ABI_FLOAT_HARD 0x00000400u
|
|
|
|
#define PT_LOAD 0x00000001u
|
|
|
|
#pragma pack(push, 1)
|
|
struct elf_header {
|
|
uint32_t magic;
|
|
uint8_t arch_class;
|
|
uint8_t endianness;
|
|
uint8_t version;
|
|
uint8_t abi;
|
|
uint8_t abi_version;
|
|
uint8_t _pad[7];
|
|
uint16_t type;
|
|
uint16_t machine;
|
|
uint32_t version2;
|
|
};
|
|
|
|
struct elf32_header {
|
|
struct elf_header common;
|
|
uint32_t entry;
|
|
uint32_t ph_offset;
|
|
uint32_t sh_offset;
|
|
uint32_t flags;
|
|
uint16_t eh_size;
|
|
uint16_t ph_entry_size;
|
|
uint16_t ph_num;
|
|
uint16_t sh_entry_size;
|
|
uint16_t sh_num;
|
|
uint16_t sh_str_index;
|
|
};
|
|
|
|
struct elf32_ph_entry {
|
|
uint32_t type;
|
|
uint32_t offset;
|
|
uint32_t vaddr;
|
|
uint32_t paddr;
|
|
uint32_t filez;
|
|
uint32_t memsz;
|
|
uint32_t flags;
|
|
uint32_t align;
|
|
};
|
|
#pragma pack(pop)
|
|
|
|
#endif |