Commit Graph

494 Commits

Author SHA1 Message Date
Harald Welte b29c24bcb7 Revert "trf6151: Fix setting of uplink ARFCN"
This reverts commit 1724003737.

For some reason the "obviously broken" code is working, but the fixed
version is not.  Let's go back to step 1 and analyze this in more
detail, but meanwhile make the code work again.
2017-01-15 20:45:45 +01:00
Harald Welte a1830440fc define 'fprintf(stderr,' as a wrapper around printf(
This is in preparation to work with a more recent version of
libosmocore, which wants to print to stderr in some cases.
2017-01-15 19:18:38 +01:00
Harald Welte 0fa403b51b Add an endian.h file as one step to build against later libosmocore 2017-01-15 19:18:38 +01:00
Harald Welte 2d7321bbde Add libosmocore/build-target/include to include path
Some header files are auto-generated and are thus in the build
directory, not in the source directory.  A cleaner way to handle this is
most likely to install libosmocore to some directory, but I don't want
to change the entire build process now.
2017-01-15 19:18:38 +01:00
Harald Welte 95b10c62ca fix various other compiler warnings 2017-01-15 19:18:38 +01:00
Harald Welte 9004de39ab cfi_flash.c: Fix various format string compiler warnings 2017-01-15 19:18:38 +01:00
Harald Welte 1724003737 trf6151: Fix setting of uplink ARFCN
Somebody (me?) wrote exclamation marks instead of pipe symbols.

Found by a modern gcc:

rf/trf6151.c: In function 'trf6151_set_arfcn':
rf/trf6151.c:439:8: warning: comparison is always true due to limited
range of data type [-Wtype-limits]
  arfcn != ~ARFCN_UPLINK;
        ^
rf/trf6151.c:439:2: warning: statement with no effect [-Wunused-value]
  arfcn != ~ARFCN_UPLINK;
  ^
2017-01-15 19:18:38 +01:00
Harald Welte 2400386c25 Avoid redefining __{packed,aligned,unused,section}
It seems modern version of newlib define those themselves, so we should
avoid re-defining them.  Removes tons of compiler warnings when
compiling against libnewlib 2.4.0
2017-01-15 19:18:38 +01:00
Steve Markgraf ce3c88e075 fw: fix SPCA552 write timing
With GCC 4.9.3 the timing was broken and initializing
the SPCA552 on the Pirelli DP-L10 did not work.
Add a small delay which fixes that.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2016-01-20 01:41:47 +01:00
Max 1a35cc801d cleanup some compile warnings 2015-12-31 14:06:03 +01:00
Felix Domke 8a2e935cdb layer1: fix chan_nr2mf_task_mask for TCH/H channel
"multiframe", the frame layout (used to compute neighbor
cell monitoring pattern) was uninitialized in TCH/H case.

This, in combination with gcc optimizing the
"switch(multiframe)"-statement into a LUT without bounds-
checking (since using an uninitialized value is undefined
behavior) caused neigh_task to be filled with an out-of-
bounds value, eventually crashing the TDMA scheduler.

Written-by: Felix Domke <tmbinc@elitedvb.net>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-07-21 13:19:16 +02:00
Steve Markgraf a903b3c1ee fw: tell linker to add init_array to ctor section
Starting with version 4.8, gcc places functions
with __attribute__ ((constructor)) in .init_array
instead of .ctors by default.

This broke firmware images built with gcc >= 4.8.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-12-29 20:33:26 +01:00
Sylvain Munaut bf83e024a6 Fix wrong msgb_pull usage
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-09-26 18:46:36 +02:00
Steve Markgraf 62d48c29da fw: remove deprecated chainload app
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-04-07 11:36:00 +02:00
Steve Markgraf ee7fbbda22 fw: pirelli_dpl10: initialize address line 22 for flash access
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-01-05 18:41:18 +01:00
Steve Markgraf 37a0543e26 fw: apps/loader: initialize framebuffer and show something
Since we now initialize the display for all apps, it
otherwise just shows the last content of the display
ram, which is weird.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-01-05 18:41:11 +01:00
Steve Markgraf 0da82b96b7 fw: keypad driver overhaul, support for different keymaps
Now the Pirelli DP-L10 keymap is supported.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-01-05 18:40:39 +01:00
Steve Markgraf 21bc3b8db0 fw: introduce per-board uart mapping
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-01-05 18:38:42 +01:00
Steve Markgraf e340681c5b fw: introduce with_irq parameter for board_init()
So far the loader-app used to do the init on its
own, which brought a lot of problems for board-
specific initialization.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-01-05 18:37:49 +01:00
Sylvain Munaut 1ccc9f8822 target: Add support for IQ swap when required
Operation in GSM850 band requires IQ swap because of the offset PLL
used in the TRF causing spectrum reversal.

Thanks to Dieter Spaar for noticing the issue and the original patch

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-02 20:44:11 +01:00
Sylvain Munaut f853f92e47 fw: Fix link scripts to represent reality more accurately
Previously they were hacks to allow build ...
Not needed now.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-02 20:44:11 +01:00
Sylvain Munaut adfc622cc1 fw/build: Allow applications to filter environments
We use an external python script to solve which env to build, to
mix board and app env list

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-02 20:44:11 +01:00
Sylvain Munaut 3ee1beb8bf fw/build: Add ENV_ APP_ BOARD_ prefix to variables to cleanup namespace
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-02 20:44:11 +01:00
Sylvain Munaut d9f6921c02 fw/build: Group env / boards / applications
No functional changes, just moving things around

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-02 20:44:11 +01:00
Sylvain Munaut 09447f3bff fw/build: The app/board/env combo macro need to be last
The app template will create the list of app specific objs so that
needs to be before

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-02 20:44:10 +01:00
Sylvain Munaut 4aab780f20 fw/build: Include app / board / env specific objs during build
Just put the env with the rest and not manifest and also allow
app additional files

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-02 20:44:10 +01:00
Sylvain Munaut 0bfedc439f fw/build: Add a silent rule for the 'size' call as well
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-02 20:44:10 +01:00
Harald Welte 73a809e57b Tell L1CTL_FBSB_REQ the expected received signal level
As Dieter points out, this drastically improves the resiliance to high
receive levels on the C155.  We cannot blindly assume a received signal
level of -85 dBm if the BTS is 2m away and we actually receive -40 dBm.

This patch extends the L1CTL_FBSB_REQ data structure in layer 1 with the
respective field, as well as the l1ctl_tx_fbsb_req() API function called
from the various layer23 apps.

"mobile" and "bcch_scan" already did a PM request and thus know the
expected signal power.  "ccch_scan" and "cbch_sniff" apparently don't
do, so the -85 dBm constant is now hardcoded into the host-side source
code there, and should probably be fixed in a follow-up patch.
2012-11-20 10:13:44 +01:00
Steve Markgraf 63cb795d22 fw/comm: remove unused, outdated copy of msgb.h
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-11-14 19:01:44 +01:00
Harald Welte 6ce46e7a86 use msgb_pull() to get bytes from start of message, not msgb_get()
msgb_get() is for getting bytes from the end of a message, but it
was broken in libosmocore for a long time (until it was fixed today).
2012-09-08 22:45:30 +02:00
Harald Welte 1362a21df4 Properly name firmware images OsmocomBB not just OSMOCOM ! 2012-06-25 15:12:30 +02:00
Christian Inci 4f0acac4c1 Adding the manufacturer id of STMicroelectronics
For supporting the flash on a Motorola C118.

Note:
Flashing rssi on it worked fine.

Signed-off-by: Christian Inci <chris.pcguy.inci@gmail.com>
2012-05-07 10:46:44 +02:00
Andreas Eversberg 757ba862e9 firmware/rssi: Adding symbols to display battery and RX level 2012-04-28 09:41:12 +02:00
Andreas Eversberg ed9d1a7414 firmware: Adding new font with symbols for battery and RX level 2012-04-28 09:41:12 +02:00
Christian Vogel 5b87e3e4bd Further work on C123 charging. 2012-04-28 09:38:46 +02:00
Christian Vogel 071747aea8 Add battery info to hello world. 2012-04-28 09:38:45 +02:00
Christian Vogel 76527fd1e3 Charging: Add to Compal_E88, dummy for others. 2012-04-28 09:38:45 +02:00
Christian Vogel d53b55016a Battery charging for C123. 2012-04-28 09:38:44 +02:00
Christian Vogel e3f9698366 Add MADC/battery related bit definitions in twl3025.h 2012-04-28 09:38:44 +02:00
Sylvain Munaut 143abe661a fw/prim_tch: Fix regression introduced in f04f53d3b7
Thanks to Andreas for spotting this.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-03-29 21:43:25 +02:00
Andreas Eversberg e7997163b2 Fixed neighbour cell measurement task for SDCCH/8 multiframes
Only on BCCH's multiframe we are allowed to measure on frames 0, 10, 20,
30, 40. On SDCCH/8 multiframe, measurements are performed on frame 50
only.
2012-03-29 09:07:57 +02:00
Steve Markgraf 978ec28b71 firmware: add missing includes
This fixes all 'implicit-function-declaration'-warnings.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-02-12 23:43:05 +01:00
Steve Markgraf 05e9b142c3 firmware/fb: add framebuffer driver for the Pirelli DP-L10 display
This commit adds a combined driver for the Sunplus SPCA-552E
Multimedia Controller and the Samsung S6B33B1X LCD controller.

I have to thank Stephan Meier, who helped me to reverse-engineer
this beast during 28c3.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-02-12 21:54:37 +01:00
Andreas Eversberg 79db3c72e5 firmware/rssi: Fixed offset of power bars in sync mode 2012-02-07 20:03:03 +01:00
Andreas Eversberg f201f06e5f firmware: Turn off FIQ, when waiting for power button to be released 2012-02-07 20:03:02 +01:00
Andreas Eversberg d0985a7ff2 firmware/monitor: Added channel request to measure distance from cell
When synced, press the green button to request channel from cell.
The result, timing advance, distance and response delay is printed
on the display. It only works, if TX is enabled and SI 3 has been
received.
2012-02-07 20:03:02 +01:00
Andreas Eversberg 0cb791a125 firmware/framebuffer: Cleanups of compiler warnings and debugging output 2012-02-07 20:03:02 +01:00
Andreas Eversberg 565840008b firmware/timer: Added HZ as global defintion for jiffies per second 2012-02-07 20:03:02 +01:00
Andreas Eversberg 284cf9a34c firmware/monitor: Improvements and sync support
By pressing the green button, the sync mode is entered. The screen
show some informations about the cell. The beep indicates, if the
received BCCH was valid or not.

By pressing the Down button, the list of channels of the serving cell
and neighbour cells can be viewed and scrolled through.

By pressing the Up button, the levels (downlink or uplink) of the serving
cell can be viewed. Also it is possible to select one of the serving
cell's frequencies by pressing the Left/Right button.
2012-02-04 00:04:58 +01:00
Andreas Eversberg 0fd73c5e0f firmware: Increased data size for for ram linker scripts.
This is required, since monitor app requires a litte more than 64k.
2012-02-04 00:04:58 +01:00