Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

userApp #143

Open
gnitnaw opened this issue Mar 6, 2017 · 16 comments
Open

userApp #143

gnitnaw opened this issue Mar 6, 2017 · 16 comments

Comments

@gnitnaw
Copy link

gnitnaw commented Mar 6, 2017

  • If I use UART4 to connect, then the screen will print lots of " � ", is it correct?
    Thanks.
@louisom
Copy link
Contributor

louisom commented Mar 7, 2017

I think the answer is NO.

Could you give me the info about your board and the setting in the user/apps/build.mk?
Because if you are using STM32F429, and building with LCD apps, you may hang by this process, and got the junk info like you got.

@gnitnaw
Copy link
Author

gnitnaw commented Mar 7, 2017

I didn't change the code (with stm32f429 discovery). All are the same (git pull yesterday).
I connect to USART4: PC11 (TX), PC10 (RX)
Here is the message after I push reset button:

====================================================
Copyright(C) 2013-2014 The F9 Microkernel Project

Git head: d466fe1
Host: x86_64
Build:������������������������������������������������������������������������������������������������������������������������������������������������....(the same)

About LCD apps, I can see the rectangle on the LCD.

@louisom
Copy link
Contributor

louisom commented Mar 7, 2017

You still need to check user/apps/build.mk, my setting is like this

# Copyright (c) 2013 The F9 Microkernel Project. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

user-apps-dirs = \
	l4test \

If you use default setting, it may contain other apps.

And if I remember correctly, UART output will use async output, so your kernel may occure some problem after __l4_printf(banner) when init with INIT_LEVEL_KERNEL_EARLY hook at start.c.

Maybe you can use gdb to trace it.

@gnitnaw
Copy link
Author

gnitnaw commented Mar 7, 2017

After I remove the ping-pong in user/apps/build.mk, it becomes:

====================================================
Copyright(C) 2013-2014 The F9 Microkernel Project

Git head: d466fe1�������������������������������������������������������������������������������������������������������������������������������

So how to solve this problem?

@gapry
Copy link

gapry commented Mar 7, 2017 via email

@gnitnaw
Copy link
Author

gnitnaw commented Mar 7, 2017

I have tried 115200, 76800, 38400, 19200, and 9600.
Only 115200 can let me see the banner...

@louisom
Copy link
Contributor

louisom commented Mar 7, 2017

@gnitnaw Can you give me your .config?

@gnitnaw
Copy link
Author

gnitnaw commented Mar 7, 2017

I did "make config" and select STM32F429 in the platform and save, that's all.

CONFIG_BOARD_STM32F429DISCOVERY=y

CONFIG_BOARD_STM32P103 is not set

CONFIG_BITMAP_BITBAND is not set

CONFIG_FPU is not set

CONFIG_STDIO_NODEV is not set

CONFIG_STDIO_USE_DBGPORT=y

CONFIG_DBGPORT_USE_USART1 is not set

CONFIG_DBGPORT_USE_USART2 is not set

CONFIG_DBGPORT_USE_USART4=y

Limitations

CONFIG_MAX_THREADS=32
CONFIG_MAX_KT_EVENTS=64
CONFIG_MAX_ASYNC_EVENTS=32
CONFIG_MAX_ADRESS_SPACES=16
CONFIG_MAX_FPAGES=256

Kernel Timer

CONFIG_KTIMER_TICKLESS=y

CONFIG_KTIMER_TICKLESS_VERIFY is not set

CONFIG_KTIMER_TICKLESS_COMPENSATION=0
CONFIG_KTIMER_TICKLESS_INT_COMPENSATION=0
CONFIG_KTIMER_HEARTBEAT=65536
CONFIG_KTIMER_MINTICKS=128

Flexible page tweaks

CONFIG_LARGEST_FPAGE_SHIFT=16
CONFIG_SMALLEST_FPAGE_SHIFT=8

Thread tweaks

CONFIG_INTR_THREAD_MAX=256

KIP tweaks

CONFIG_KIP_EXTRA_SIZE=128

Kernel hacking

CONFIG_DEBUG=y
CONFIG_DEBUG_DEV_UART=y
CONFIG_KDB=y
CONFIG_KPROBES=y
CONFIG_SYMMAP=y
CONFIG_PANIC_DUMP_STACK=y

CONFIG_LOADER is not set

Test Case

@gapry
Copy link

gapry commented Mar 7, 2017 via email

@gnitnaw
Copy link
Author

gnitnaw commented Mar 7, 2017

No, I simply follow your instruction:
sudo screen /dev/ttyUSB0 115200 8n1

@louisom
Copy link
Contributor

louisom commented Mar 7, 2017

That's weird. Using your setting with master (d466fe1) branch, I can get the output:

====================================================
 Copyright(C) 2013-2014 The F9 icrokernel Project  
====================================================
Git head: d466fe1dcf8c0b230a6e7397ba4402bf5812bd37
Host: x86_64
Build: 2017-03-07T18:32:35+0800

Press '?' to print KDB menu

L4/Pistachio test suite starts

Simple IPC test (inter-as, only untyped words)
  Send Message transfer:   OK
  ReplyWait Message transfer:   OK
Returned Id 0 != 0 (local) [0 (global)]
  From parameter (local):   FAILED
Kernel panic: Hard fault. Restarting
-------KTABLES------

@gnitnaw
Copy link
Author

gnitnaw commented Mar 7, 2017

If I use UART2 (change setting in .config , and connect to PD5/PD6) instead of UART4, I get:

====================================================
Copyright(C) 2013-2014 The F9 Microkernel Project

Git head: d466fe1
Host: x86_64
tt y sma2d o)0

KDB

@gnitnaw
Copy link
Author

gnitnaw commented Mar 7, 2017

Here is the message with USART1:

====================================================
Copyright(C) 2013-2014 The F9 Microkernel Project

Git head: d466fe1
Host: x86_64
Build: 2017-03-07T12:08:07+0100

Press '?' to print KDB menu

L4/Pistachio test suite starts

Simple IPC test (inter-as, only untyped words)
Send Message transfer: OK
ReplyWait Message transfer: OK
Returned Id 0 != 0 (local) [0 (global)]
From parameter (local): FAILED
lcd main

@gapry
Copy link

gapry commented Mar 7, 2017

@gnitnaw For now, I know you have tried USART1, UART2 and UART4 but it doesn't work normally.

Hence, I suggest you to read the document STM32F420 Note at this moment, please pay attention 「示範專案:USART 測試程式」, which is a part of the document.

If it doesn't work, I suggest you change your USB TTL Cable.

@gnitnaw
Copy link
Author

gnitnaw commented Mar 7, 2017

For me USART1 works... USART2/4 doesn't work.

@ab1aw
Copy link

ab1aw commented Mar 5, 2019

Are you also using the LEDs? The LEDs and the USART4 (PA0 and PA1) are using the same GPIO pins. Take a look at my ping-pong and other apps on my fork to see working variations of user/apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants