This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Make App output log via Serial Console (UART) - instead of RTT ...

Hi,

In gps sample, the prj.conf file is:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CONFIG_BSD_LIBRARY=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_SOCKETS=y
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
CONFIG_BOARD_NRF9160_PCA10090NS=y
# Disable native network stack to save some memory
CONFIG_NET_IPV4=n
CONFIG_NET_IPV6=n
CONFIG_NET_UDP=n
CONFIG_NET_TCP=n
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


 And I can use Putty or Serial.app (on my Mac) to view the output Thumbsup tone1

In our application the prj.conf file is the following:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# General config
CONFIG_NEWLIB_LIBC=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_ASSERT=n
CONFIG_REBOOT=y
CONFIG_SENSOR=y
CONFIG_DEBUG=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_SEGGER_SYSTEMVIEW=n
# Trusted execution
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
# BSD library
CONFIG_BSD_LIBRARY=y
CONFIG_BSD_LIBRARY_TRACE_ENABLED=n
# Library for buttons and LEDs
CONFIG_DK_LIBRARY=y
CONFIG_DK_LIBRARY_INVERT_LEDS=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

NOTE: I haven't written the original code, just took over and continuing developing on it. 

I have tred to set all the settings from the GPS Sample code in our prj.conf-file ... cleaned the solution, closed & re-opened the solution ... to make sure the prj.conf is "applied" in SEGGER ... and freshly re-built the code ... 

But It doesn't seem to work. 

I'm guessing there's a one / few settings that maybe are overriding each other? (if you enable option-x, then option-s won't work ... etc etc) 

Does someone have a clue to what's going on?

----------------

PS - Yes, if I enable RTT in our prj.conf it works Thumbsup tone1... but I'd like to use serial-console-logging.