kopia lustrzana https://github.com/lucckb/libpsk
HAMlib compile under isix
rodzic
32daa26a3e
commit
246046451b
|
@ -5,3 +5,4 @@ syntax: glob
|
||||||
*.orig
|
*.orig
|
||||||
*.elf
|
*.elf
|
||||||
.*
|
.*
|
||||||
|
*.a
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#PSK lib isix header
|
||||||
|
LIBPSK_CPPSRC += $(wildcard $(LIBPSK_DIR)/libpsk/src/codec/*.cpp)
|
||||||
|
LIBPSK_CPPSRC += $(wildcard $(LIBPSK_DIR)/libpsk/src/ham/*.cpp)
|
||||||
|
LIBPSK_CPPSRC += $(wildcard $(LIBPSK_DIR)/libpsk/src/psk/*.cpp)
|
||||||
|
LIBPSK_INC += -I$(LIBPSK_DIR)/libpsk/include
|
||||||
|
|
||||||
|
|
||||||
|
LIBPSK_LIB += $(LIBPSK_DIR)/libpsk.a
|
||||||
|
LIBPSK_OBJS += $(LIBPSK_CPPSRC:%.cpp=%.o)
|
||||||
|
DEPFILES += $(LIBPSK_CPPSRC:%.cpp=%.dep)
|
||||||
|
|
||||||
|
.ONESHELL:
|
||||||
|
$(LIBPSK_LIB): $(LIBPSK_OBJS)
|
||||||
|
$(AR) $(ARFLAGS) $@ $^
|
||||||
|
|
||||||
|
LIBS += $(LIBPSK_LIB)
|
||||||
|
LIBS_OBJS += $(LIBPSK_OBJS)
|
||||||
|
COMMON_FLAGS += $(LIBPSK_INC) -D_GLIBCXX_USE_C99_MATH_TR1
|
|
@ -79,11 +79,12 @@ namespace _internal
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
//TODO: Cortex M3 biteverse use RBIT AND ASR in CM3
|
//TODO: Cortex M3 biteverse use RBIT AND ASR in CM3
|
||||||
inline unsigned bitrev( unsigned v, int m )
|
inline unsigned bitrev( unsigned value, int m )
|
||||||
{
|
{
|
||||||
|
unsigned result;
|
||||||
|
asm ("rbit %0, %1" : "=r" (result) : "r" (value) );
|
||||||
|
return result >> ( 32 - m );
|
||||||
}
|
}
|
||||||
#error Bit reverse not implemented yet
|
|
||||||
#endif
|
#endif
|
||||||
//Constant class definition
|
//Constant class definition
|
||||||
template<typename T, typename K> class scaledV
|
template<typename T, typename K> class scaledV
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#ifndef LIBPSK_SPECTRUM_CALCULATOR_HPP_
|
#ifndef LIBPSK_SPECTRUM_CALCULATOR_HPP_
|
||||||
#define LIBPSK_SPECTRUM_CALCULATOR_HPP_
|
#define LIBPSK_SPECTRUM_CALCULATOR_HPP_
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
|
#include <cmath>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
@ -15,7 +16,6 @@
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
namespace ham {
|
namespace ham {
|
||||||
namespace psk {
|
namespace psk {
|
||||||
|
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
//Class spectrum calculator calculate the current spectrum
|
//Class spectrum calculator calculate the current spectrum
|
||||||
class spectrum_calculator {
|
class spectrum_calculator {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#ifndef COMPILED_UNDER_ISIX
|
#ifndef COMPILED_UNDER_ISIX
|
||||||
#include "port/pulse/pulse_device.hpp"
|
#include "port/pulse/pulse_device.hpp"
|
||||||
#else
|
#else
|
||||||
#error not implemented yet
|
#warning not implemented yet
|
||||||
#endif
|
#endif
|
||||||
#include "psk/decoder.hpp"
|
#include "psk/decoder.hpp"
|
||||||
#include "psk/modulator.hpp"
|
#include "psk/modulator.hpp"
|
||||||
|
@ -28,6 +28,10 @@ namespace
|
||||||
return new pulse_device( std::bind(h, sys_idx, std::placeholders::_1) );
|
return new pulse_device( std::bind(h, sys_idx, std::placeholders::_1) );
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
inline trx_device_base* create_default_device( ham_digi::handler_t h ) {
|
||||||
|
return nullptr;
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
7
unix.mk
7
unix.mk
|
@ -9,8 +9,6 @@ CP = $(CROSS_COMPILE)objcopy
|
||||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||||
SIZE = $(CROSS_COMPILE)size
|
SIZE = $(CROSS_COMPILE)size
|
||||||
|
|
||||||
#Current platform
|
|
||||||
PLATFORM_DEVICE ?= BFC1
|
|
||||||
|
|
||||||
#Pozostale ustawienia kompilatora
|
#Pozostale ustawienia kompilatora
|
||||||
ASFLAGS +=
|
ASFLAGS +=
|
||||||
|
@ -42,11 +40,6 @@ CXXFLAGS += -ffunction-sections -fdata-sections
|
||||||
LDFLAGS+= -Wl,--gc-sections
|
LDFLAGS+= -Wl,--gc-sections
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM_DEVICE), BF210)
|
|
||||||
CFLAGS += -DPLCXML_BF210_PLATFORM
|
|
||||||
CXXFLAGS += -DPLCXML_BF210_PLATFORM
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue