From: Damian Z. <dam...@gm...> - 2021-04-19 19:09:32
|
I've checked build situation with LLVM/Clang version 12 and I also got working llvm-objcopy without segfault as well, so pretty much it might be doable to replace GCC toolchain with LLVM/Clang toolchain for bare metal arm, which can have a benefit like saving disk space, OOTB support for bare metal PowerPC target (last build I've seen from GCC was for version 5.2.0, outside of paid compilers) and so on. pon., 19 kwi 2021 o 18:56 Damian <dam...@gm...> napisał(a): > > Apr 19, 2021 18:32:43 R. Diez <rdi...@ya...>: > > > > >> Regarding LLDB - it have issues for bare metal debugging as it does not > contain stubs > >> for thread if there's no OS, so it's needed to write it yourself with > Python bindings. > > > > Thanks for the hint. I had assumed that you would need special threading > support for each OS, but not for the "simple" case of bare metal, where > there are no threads to support. > > > > If you need to write Python bindings yourself, that probably means that > very few people are using LLDB for embedded development with OpenOCD. I > don't even know Python, so that is out of the question for me at the > moment. I would have thought that such Python bindings for bare metal would > be the same everywhere and would be readily available, but it does not seem > to be the case. > > > > I gather from your answer that you do not have experience yourself with > LLDB together with OpenOCD. But maybe somebody else around here has. > > > > > >> For compilation with LLVM/Clang for bare metal it's not bad, you can > link and compile, > >> but it's not fully drop-in, as you need to create config file instead > of specs file or specify everything by hand, but certainly works. > > > > Do you have first-hand experience with it then? Would you recommend it? > Can OpenOCD with GDB debug LLVM / Clang firmware without problems? > > > > Regards, > > rdiez > In GDB case, they have those stubs in GDB itself implemented to deal with > this situation and it would be great if somebody will create standardized > python plugin to LLDB to handle this. > > Yes, I have first - hand experience with usage of LLVM/Clang in bare metal > ARM and despite minor issues like config vs specs or other things hardcoded > with only GCC in mind to be fixed, I really recommended to use LLVM/Clang > instead of GCC toolchain in embedded space, mostly to iron out existing > bugs in tools like llvm-objcopy or lld, because it creates competitive > space also in bare metal case. > I was not able to test GDB with FW built with LLVM yet, but I would assume > it will work without problems. > |