Commit Graph

55 Commits

Author SHA1 Message Date
Harald Welte 11f0d5e846 contrib/jenkins.sh: Fix missing nvic.h
if we don't call 'make' in libopencm3 of a clean install, we will be
missing some generated nvic.h header files and compilation will fail
like below:

In file included from ../../libopencm3//include/libopencm3/cm3/nvic.h:147,
                 from ../../librfn/librfn/libopencm3/console_stm32.c:24:
../../libopencm3//include/libopencm3/dispatch/nvic.h:8:11: fatal error: libopencm3/stm32/f1/nvic.h: No such file or directory
 # include <libopencm3/stm32/f1/nvic.h>
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-08-11 22:44:49 +02:00
Oliver Smith c7e08bbd11 contrib/jenkins: skip upload if nothing new
Add the same behavior as in osmo-ccid-firmware
I3f70d6149b29ec2ff7f185dfae8bc8d4a1953dc2.
2022-07-15 12:56:08 +02:00
Oliver Smith 1067d320fa contrib/jenkins: use rsync --copy-links for latest
Don't upload symlinks that point to files that aren't there. Upload the
files they should point to instead.
2022-07-15 12:30:53 +02:00
Oliver Smith ecf0442099 contrib/jenkins: build all projects before upload
Don't upload anything if any of the projects fail to build to avoid
ending up with a half-updated directory at ftp.osmocom.org and possibly
having confusion about the versions.

While at it, move known_hosts to /tmp so it doesn't clutter the git repo
dir in local testing.
2022-07-12 12:40:44 +02:00
Oliver Smith 1c52a132c8 contrib/jenkins.sh: build libopencm3 first
Fix for:
  fatal error: libopencm3/stm32/f1/nvic.h: No such file or directory

Related: SYS#6041
2022-07-12 12:17:12 +02:00
Oliver Smith 7f8de1ae23 contrib/jenkins.sh: "RES:$?" -> "DONE"
Don't try to print the exit code of make. It's either always 0 or the
program aborts before reaching the echo due to the "set -e". Removing $?
here makes that more obvious.
2022-07-12 12:10:23 +02:00
Harald Welte cbff8e75d0 Make code compatible with picolibc >= 1.7.3
picolibc commit 1eba3461fd1664d38be36f3bf21898f889a7d2e3 changed
the way how stdio backends are used by picolibc.  Let's use the
PICOLIBC_STDIO_GLOBALS to differentiate the old vs. new method.

Closes: SYS#6042
2022-07-11 17:56:55 +02:00
Harald Welte 63c07a8bd1 rfdsatt: remove redundant redeclaration of microvty_fibre
rfdsatt.c:501:16: warning: redundant redeclaration of 'microvty_fibre' [-Wredundant-decls]
  501 | extern fibre_t microvty_fibre;
      |                ^~~~~~~~~~~~~~
In file included from rfdsatt.c:35:
../../libcommon/include/libcommon/microvty.h:48:16: note: previous declaration of 'microvty_fibre' was here
   48 | extern fibre_t microvty_fibre;
      |                ^~~~~~~~~~~~~~
2022-07-11 17:33:55 +02:00
Harald Welte 7527cab6d8 add missing libcommon.mk 2021-05-09 12:05:46 +02:00
Harald Welte ea39ae17d7 add contrib/jenkins.sh for build verification and publcation of builds 2021-05-09 12:00:31 +02:00
Harald Welte c8cb0398eb rename relay-driver binary to directory name
This makes a general-purpose build upload script more simple
2021-05-09 12:00:31 +02:00
Harald Welte bf11a41c88 Makefile: Build file names with version suffix 2021-05-09 12:00:31 +02:00
Harald Welte 3a339ee80b rfdsatt: Add support to store/load config to/from EEPROM 2021-05-07 20:05:12 +02:00
Harald Welte e63259baaa rfdsatt: add low-level EEPROM read/write support 2021-05-07 20:04:53 +02:00
Harald Welte 3b39d671fe rfdsatt: fix I2C initialization
* 2MHz is far enough for I2C
* we need to re-map I2C1 to PB8+PB9
2021-05-07 16:23:30 +02:00
Harald Welte 7d1c8741b8 rfdsatt: interactive help for test + interact mode 2021-05-07 12:28:30 +02:00
Harald Welte b86a2daad1 microvty: Implement backspace and ctrl+c support; ignnore TAB + ESC 2021-05-07 12:22:28 +02:00
Harald Welte 3cfd61baa7 rfdsatt: Move to 1-based channel and stage numbers
This matches more with how SCPI controlled attenuators work
2021-05-07 12:22:28 +02:00
Harald Welte dfb3294ac8 Detect the OpenBLT XCP-CONNECT and reset (jump to bootloader)
This allows for firmware updates without power cycling
2021-05-07 08:37:35 +02:00
Harald Welte 60499f4ebf rfdsatt: add 'test' command for ramping up the gain of one channel 2021-05-06 08:33:01 +02:00
Harald Welte 1adf7c0ee4 rfdsatt: fix msleep() 2021-05-06 08:32:48 +02:00
Harald Welte 627ead7b21 attenuator: Add convenience functions for setting all stages 2021-05-06 08:26:46 +02:00
Harald Welte 5d2e32e4b8 attenuator: rename functions to make them more descriptive 2021-05-06 08:20:03 +02:00
Harald Welte 6284afc23d attenuator: split out 'execution' from 'validation' part 2021-05-06 08:16:18 +02:00
Harald Welte 73b514d793 rfdsatt: Add 'interactive' mode with single-key modifications 2021-05-05 23:00:14 +02:00
Harald Welte e431886969 attenuator: disable GPIO debugging 2021-05-05 23:00:14 +02:00
Harald Welte 7b684307f7 attenuator: Fix stored/cached value per attenuator 2021-05-05 23:00:14 +02:00
Harald Welte 4e20a652a2 rfdsatt: abbreviate mircovty commands as we have no tab completion 2021-05-05 23:00:14 +02:00
Harald Welte b94ed88133 rfdsatt: Add 'attenuator-show' microvty command 2021-05-05 23:00:14 +02:00
Harald Welte cd97005150 rfdsatt: move LED and microvty to fibre/protothreads 2021-05-05 23:00:14 +02:00
Harald Welte abfceb45f5 attenuator: set initial state of outputs to 'low'
otherwise they might be high, which means the latch is permanently
enabled.
2021-04-13 19:02:20 +02:00
Harald Welte e8849c28ea rfdsatt: re-maip HSE pins to PD0/PD1
STM32F1 uses those pins as HSE by default, we need to explicitly
re-map them to PD0/PD1
2021-04-13 18:57:40 +02:00
Harald Welte 26b10f3e5d rfdsatt: Disalbe JTAG AF on some GPIO lines overlapping LE 2021-04-13 18:42:14 +02:00
Harald Welte f025e64a57 attenuator: Print level at time of write. 2021-04-13 17:21:04 +02:00
Harald Welte 2a91fc857b attenuator.c: DAT-31A-S+ has 6th unused bit
So In reality DAT-31A-S+ seems to have steps of 0.5dB, but the LSB
is "defined" to be alwasy 0.  This means we have to multiply the
dB value by 2 (shift one left) to make sure the LSB in 0.5dB steps
remains 0, and to make sure we actually step n steps of 1dB
2021-04-13 17:19:08 +02:00
Harald Welte b4781312f9 import firmware for the blue-pill relay driver board (NCV7240)
this usd to be in a private fork of i2c-star.git, but let's
keep all osmocom related stm32f0/f1 firmware projects here.
2021-04-11 17:03:16 +02:00
Harald Welte 3af30f0a6a rfdsatt: use librfn/time.h instead of own systick handler 2021-04-11 16:24:33 +02:00
Harald Welte f9b2ca10b4 import librfm3 from https://github.com/daniel-thompson/i2c-star.git
Daniel Thompson has loads of useful code out there :)

Reflects 07eff5c0b7333cfcc3d98ddc6ebf26e34c9c02ef of that repo.
2021-04-11 15:43:10 +02:00
Harald Welte 13ae607484 rfdsatt: move away from deprecated libopencm3 APIs
This resolves compiler warnings about the use of deprecated APIs.
2021-03-28 22:08:20 +02:00
Harald Welte 436ba01a47 update libopencm3 to use the vector.h slot addition 2021-03-28 22:05:29 +02:00
Harald Welte ff70203fba update libopencm3 to osmocom fork (for vector table patch) 2021-03-28 22:00:07 +02:00
Harald Welte 645ed3a795 WIP: support for STM32F051 in addition to STM32F103
Related: SYS#5410
2021-03-28 18:43:25 +02:00
Harald Welte 8074b2cdc4 rfdsatt: Fix length of UUID string buffers 2021-03-28 18:06:59 +02:00
Harald Welte f65f08b841 rfdsatt: Command to show firmware build version 2021-03-28 16:53:54 +02:00
Harald Welte 80c9eee3f6 move libopencm3 make rules to 'mk' 2021-03-28 16:48:52 +02:00
Harald Welte f58fda447e rfdsatt: add uuid and reset command; print banner at startup 2021-03-28 16:46:53 +02:00
Harald Welte f26576f299 update erroneously copy+pasted copyright notice 2021-03-28 16:46:33 +02:00
Harald Welte 1cc7bad32e microvty: re-display prompt on empty command 2021-03-28 16:46:15 +02:00
Harald Welte f962556911 integrate microvty 2021-03-28 16:16:16 +02:00
Harald Welte 8bcec75693 integrate picolibc and its stdio 2021-03-28 15:29:48 +02:00