Computing > Programming

Crazyness: C and C++ mixing

<< < (14/14)


--- Quote from: Nominal Animal on June 19, 2021, 03:19:52 pm ---I wish I had a real answer to that!

--- End quote ---

This also depends on the tool-chain. For example, a couple of commercial tool-chains I need to use are for Windows and they just need to click "setup.exe" and follow the video instructions.

Analog Devices DSP Visual Studio ++
CodeWarrior Studio

(I don't like Windows, but .... I have to say, the instructions you have to follow on Windows XP are the same you have to follow on Windows 10, and the development tool is exactly the same, that's a good point!)

In these examples, it's all included, and it also includes the support for the debugger, as well as templates and "get started" examples for the bootstrap code.

Linux and FreeBSD have a different approach with G-CC or Clang, and it's a rather "rolling" approach, if you read an "how to" article today, the given instructions may become out of date the next day due to the volatile nature of the tools involved and you need more specific knowledge and skills to manage them as well as the things required by "ecosystem".

So I think there is no simple answer, and only practical experience can tell and teach  :-//


--- Quote ---I wasn't aware that e.g. TinyAVR 0, 1, and 2 all have an unified address space!
--- End quote ---
Also the "mega0" line (ATmega4809) manages to map a full 48k of Flash space into the 64k unified address space, and the newer AVRmmDxpp can map 32k at a time (of their up-to-128k) into unified addresses via yet another bank switching scheme.  (I'm not sure that's good for C in general, beyond pretending that you have an aways-there 32k, but...)

--- Quote ---
--- Quote ---["xtiny"] aren't fully compatible with traditional AVR, hence somewhat obscure. They are 8 bit, but peripherals have changed.
--- End quote ---
Yup, two years ago, I abandoned them for exactly this reason.
--- End quote ---
You should probably reconsider, IMO.  The changes in peripherals are "compatible with modern practices", the new features are useful, Microchip has dontinued the line enough that I'm pretty confident it's their vision of the future, and they have significantly more RAM/flash/perhipherals than the previous generations at a lower cost.  (Still no USB or 8pin/8kB chips, though.  The 32u4 and tiny85 must be real cash cows.)

--- Quote ---im not familiar with 99% of the content:
- linker script
- vector table
- boot
--- End quote ---
Yes, there's quite a bit of effort that goes on in the process of putting "generic" output from a compiler into an address space (or two) that isn't flat, contiguous, isn't read/write everywhere, and has "special addresses" containing "magic stuff."  Fortunately, compiler writers have kept up pretty well (I can remember when "produces ROMable code" was a selling point for 8088 compilers), and the "usual cases" don't require manual intervention.  It's worth learning about, at least "some."   (it's vaguely similar to the shock that new assembly language programmers go through when they are faced with not having initialized RAM.)


[0] Message Index

[*] Previous page

There was an error while thanking
Go to full version