Some basic questions about development under linux

Hi All,

I appreciate your time spending on this newbie, but long questions…

I recently just fixed the toolchain for the Arrow CycloneV FPGASoC kit, and what confused me is the document said actually there are 2 sets of toolchains, one for baremetal, and one for Linux environment. It says the difference is the lib, one uses newlib, and one uses Glibc. I checked the arch of the 2 sets of toolchains, they looks very similar, both have gcc, g++ and anything else. Anyway, this is not my point here.

I have some experience with MCU,

Well, an important difference is that a baremetal (No OS) compiler compiles using physical adresses. The memory locations where program and data code are placed is known before compilation. That is so because there is only one program running in the system. It is similar to MCU.
When using an OS like Linux the compiler uses virtual addreses to identify memory positions because it is not know where the program is going to be in memory when running. Virtual addresses are like offsets from the starting point of the program (unknown before hand). When running the program the OS decides where to load the program and when the program is executing the OS is continously changing virtual addresses in code to physical ones in memory to access data. For that purpose a hardware unit called MMU is used.