Hi. I'm working on a custom -non-linux- imx6 solution. Can anyone point me to the minimum register writes etc to get a simple uart up? I understand, I think, the IVT and DCD stuff, and I believe I ought to be able to put all I need in that area for proof of concept... Any help appreciated.. Thanks
解決済! 解決策の投稿を見る。
Please apply to the Platform SDK.
Chapter 33 (Configuring the UART Driver) of "iMX6_Firmware_Guide.pdf" in documentation provides detailed
descriptions of UART configiring.
Hi.. I have seen that document. It goes a long way. I think it is the clock sourcing I'm getting lost in. What is the clock input to the uart block (MHz)?.. does that need enabling after my code had been entered, or should the imx6 internal boot rom have set that going? ..(my code is the first code encountered.. it sits where something like uboot would sit, so I cannot rely on most of the normal assumptions about setup...)
What I need to get to is a really minimal sdcard image that outputs a serial character (to prove I can, hence keep sane) before any other initialisation (e.g. mmu setup etc) is done.
Your reply appreciated, thanks
Hello Yuri,
I built the given uart0_led example using "gcc-arm-none-eabi-4_9-2015q3-20150921-win32 GCC ARM Embedded project files : GCC ARM Embedded " toolchain (however not the Sourcery g++ Lite which you have used as seen in test.map ). Sourcery g++ Lite is now Mentor Graphics product which is available for 30 days evaluation only. So dropped an idea of using it for future developments
The problem now I face is in the makefile. Please check in the attached .jpeg file which shows an error relating make***[] error 1.
I am using GNU ARM Eclipse Build Tool for make. GNU ARM Eclipse - Browse /Build Tools at SourceForge.net
May I please know where am I going wrong.
Thanks and regards,
Sarang
Hi,
The makefile in my package may be not needed for Eclipse.
It is intended to build the image under command line (CMD).
Also, You may look at
Integrating Processor Expert for i.MX and ARM GCC with Eclipse
Regards,
Yuri.
Hi,
I deleted makefile of your sample example then build it. Eclipse generated its own makefile. Still I get the same error. Any solution to this problem?
I have followed the steps at Integrating Processor Expert for i.MX and ARM GCC with Eclipse to get eclipse up and running for iMX6DL bare metal LED flicker. I have even build the sample sources.7z.zip at that link but it too gives an error for the makefile (after letting Eclipse to create its own makefile)
I have attached .jpg to show the errors thrown. First image shows Makefile error in uart1_led and Second image shows Makefile error in sample at Integrating Processor Expert for i.MX and ARM GCC with Eclipse ( -lcs3 and -lcs3arm error may be due to Sourcery Codebench toolchain used by the author but I have used GCC ARM toolchain GCC ARM Embedded project files : GCC ARM Embedded )
Any solution to this error of makefile???
Regards,
Sarang
Hi,
After reading GNU ARM Eclipse / Support requests / #30 Trying to compile with arm-none-eabi-g++ and Help for building or using GCC , it seems that the error is in the Linker Script (mx6dq.ld file).
But still the mystery of error continues. I am using ARM GCC version 4.9.3
Regards,
Sarang
Hi,
There is the article of Miro Samek, which is very helpful in clarifying of startup code
and linker script. Please refer to “Building Bare-Metal ARM Systems with GNU”.
You may try the simplest linker file (for OCRAM) as following :
SECTIONS
{
. = 0x00920000;
.text : { *(.text) }
.data : { *(.data) }
.bss : { *(.bss) }
}
Please refer to section 3.3 (Simple Linker Script Example) of “ld.pdf” in toolchain
documentation for more details.
Regards,
Yuri.
Thank you Yuri for your replies.
I figured out the solution to the error: Undefined reference to '_exit'. After reading http://stackoverflow.com/questions/19419782/exit-c-text0x18-undefined-reference-to-exit-when-using-a... I had to add --specs=nosys.specs command in eclipse as shown in the figure.
Regards,
Sarang
Hi,
Also, You may write own (minimal) syscalls lib. Please refer to
Chapter 12 (System Calls) of "libc.pdf" in toolchain documentation.
Regards,
Yuri.
Is that program (uart_led/test.bin) compiled for a i.MX6 ? It does not have the format (ivt + boot data + dcd + application) of a i.MX6 Boot Rom Program Image, and it is linked to be loaded at 0x900000 which is a reserved address in the i.MX6. It is supposed to work on a i.MX6 ?
Yes, the led example is intended for JTAG load (to internal RAM), no IVT there.
As for IVT, please use U-boot
Hi
The code as provided I did recompile, because I was also using a non GPL
build environment, BUT, it does show all that is needed to get a serial
port running. As such it proved invaluable!
John
Stop press! Just announced -
Free Standard Broadband for 6 months, unlimited data, and no minimum
contract
For full details of see http://www.JustAskJB.co.uk
<http://www.justaskjb.co.uk>
Intrigued? Call me
John Ballance C.Eng MIET - jwb@rosery.net - 07976 295923
sample.. where please?
Please take a look at thread activities again - it contains file "uart1_led.7z.zip"
I used your code, but it is not working on imx6q sabre lite board. I've done the pin changes for it to work on UART1 specific to this board. But still it is not working. I'm using eclipse and sourcery codebench. Can you please help in this regard?
Thanks Yuri
That is brilliant.. I hadn't realised there was another way to view the thread.. when I found that, I found your reply. A lovely thing to wake up to!