In EDK2: How to use the real Libraries (MdePkg)
Posted: Tue Sep 21, 2021 1:12 am
Hi everyone,
I recently started an EDK2 project for a little embedded board. Everything works fine so far, but now I struggle with the serial communication.
What I did:
I used this Introduction (step by step) to create my application: https://wiki.osdev.org/EDK2
Some additional functionality I added works so far:
Now I wanted to use the serial communication. This is what I tried:
In my .dec file:
Adding following :
When calling SerialPortInitialize/...Send/...Receive in my main function, it executes those methods from MdePkg/Library/BaseSerialPortLibNull.c instead. (Obviously not sending anything on the serial bus)
How can I call the "correct" function instead of that stub/null thing? I tried to search in this forum, also in google for several hours now but can't find the answer yet.
Any help would be awesome, thank you for reading!!!
I recently started an EDK2 project for a little embedded board. Everything works fine so far, but now I struggle with the serial communication.
What I did:
I used this Introduction (step by step) to create my application: https://wiki.osdev.org/EDK2
Some additional functionality I added works so far:
- I successfully jumped to 32 Bit mode and can execute stuff there
- Printing stuff on the screen
- Accessing files (reading and writing)
Now I wanted to use the serial communication. This is what I tried:
In my .dec file:
Adding following :
Code: Select all
[Packages]
...
PcAtChipsetPkg/PcAtChipsetPkg.dec
UefiCpuPkg/UefiCpuPkg.dec
...
[LibraryClasses]
...
SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf
How can I call the "correct" function instead of that stub/null thing? I tried to search in this forum, also in google for several hours now but can't find the answer yet.
Any help would be awesome, thank you for reading!!!