Ajout FishPeper

This commit is contained in:
Serge NOEL
2026-04-21 12:19:15 +02:00
parent 6744da3f88
commit 0c361a2440
2160 changed files with 589301 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
# Raspberry target
This is a target to build OpenSky and run using a raspberry pi, with an CC2500 chip connected directly to the spi bus. Using the raspberry target is an easy way for experimenting with the code.
OpenSky requires good timing to be able to do frequency hoping correctly, but an ideling raspberry pi seems to do just fine.
Here is how i connected up my module:
<pre>
Raspberry Pi V2 CC2500
16 GPIO23 GDO2
17 VCC VCC
19 MOSI SI
21 MISO SO
23 SCLK SCLK
25 GND GND
03 GPIO02 LNA (Optional, if your chip have LNA)
05 GPIO03 PA (Optional, if your chip have PA)
37 GPIO26 BIND (pull up to enter bind mode)
08 TXD SBUS (output using hardware uart)
40 GPIO21 PPM (software bit banged, low quality)
</pre>

View File

@@ -0,0 +1 @@
#define DEFAULT_FSCAL_VALUE 0

View File

@@ -0,0 +1,101 @@
# object files
DRIVER_SRCS =
HAL_SRCS := hal_adc.c \
hal_cc25xx.c \
hal_io.c \
hal_sbus.c \
hal_soft_serial.c \
hal_spi.c \
hal_storage.c \
hal_timeout.c \
hal_uart.c \
hal_wdt.c \
hal_ppm.c \
hal_debug.c
ARCH_DIR = arch/rasp
ARCH_SRCS := $(addprefix $(ARCH_DIR)/, $(HAL_SRCS))
ARCH_HEADERS := $(ARCH_SRCS:.c=.h)
BOARD_SRCS := $(ARCH_SRCS) \
$(GENERIC_SRCS)
# fetch this dir during include
SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
#name of executable
RESULT ?= opensky_$(notdir $(TARGET_LC))
#faster build
MAKEFLAGS+="-j1 "
#opt
CFLAGS += -O1 -g
# Tool path, only override if not set
TOOLROOT ?= /usr/bin
# Tools (note: for cross compiling we use gcc as linker!)
CC = gcc
LD = gcc
AR = ar
AS = gcc
OBJ = objcopy
# Search path for standard files
vpath %.c $(SRC_DIR)
vpath %.c $(ARCH_DIR)
# Search path for perpheral library
vpath %.c $(CORE)
vpath %.c $(PERIPH)/src
vpath %.c $(DEVICE)
# Processor specific
PTYPE = RASP
# Compilation Flags
FULLASSERT = -DUSE_FULL_ASSERT
INCLUDE_DIRS := $(INCLUDE_DIRS) \
$(SELF_DIR) \
$(SRC_DIR) \
$(DEVICE) \
$(CORE) \
$(PERIPH)/inc \
$(ARCH_DIR)
CFLAGS += $(addprefix -I,$(INCLUDE_DIRS)) \
-D$(PTYPE) \
-DUSE_STDPERIPH_DRIVER \
$(FULLASSERT) \
-DBUILD_TARGET=$(TARGET_LC)
TARGET_OBJS = $(addsuffix .o,$(addprefix $(OBJECT_DIR)/$(TARGET)/,$(basename $(BOARD_SRCS))))
TARGET_DEPS = $(addsuffix .d,$(addprefix $(OBJECT_DIR)/$(TARGET)/,$(basename $(BOARD_SRCS))))
# Build executable
board: $(OBJECT_DIR)/$(RESULT)
$(OBJECT_DIR)/$(RESULT): $(TARGET_OBJS)
$(V1) exit
$(V1) echo Linking: $(TARGET)
$(V1) $(LD) -o $@ $^ $(LDFLAGS)
# compile and generate dependency info
$(OBJECT_DIR)/$(TARGET)/%.o: %.c
$(V1) mkdir -p $(dir $@)
$(V1) echo "%% $(notdir $<)" "$(STDOUT)" && \
$(CC) -c -o $@ $(CFLAGS) $<
$(OBJECT_DIR)/$(TARGET)/%.o: %.s
$(V1) mkdir -p $(dir $@)
$(V1) echo "%% $(notdir $<)" "$(STDOUT)"
$(V1) $(CC) -c $(CFLAGS) $(DEPFLAGS) $< -o $@
clean:
$(V1) echo Cleaning: $(TARGET)
$(V1) rm -f $(OBJECT_DIR)/$(TARGET)/*.o $(OBJECT_DIR)/$(TARGET)/*.d
.PHONY: board clean flash debug