am a lifetime programmer in 8051 as ... I have designs from [up] to 128kbytes length of code, I wrote a lot of code for sensors, wireless modules, data analysis, communication, etc. I also wrote an RTOS which is included in almost all my designs.
You wrote an RTOS for 8051 assembly programs?!
-how the hardware and IDE interacts through BSP, how a BSP is written, is BSP required in all designs, etc.
So...
ARM-architecture chips divide into two parts. There is the "ARM Core", which was designed by ARM, and is standard across all parts with the same CPU (M0, M3, M4...) The Core includes the CPU, assorted buses, and some common peripherals (a single "tick" timer, an interrupt controller, and standardized debugging access and features.)
Then there is "the rest of the chip." Memory and peripherals. These tend to be vendor specific (ie everyone's flash memory is programmed differently, and their UARTs are dissimilar.) (The 8051 derivatives all sort-of have the original standardish UART, Ports, and Timer, right? ARMs may be a rude awakening, in that respect.)
ARM has specified a standard STYLE of peripheral access - part of what they call CMSIS - they're all accessed via memory-mapped C structures, like:
struct {
__io uint32_t ctrl;
__i uint32_t stat;
__io uint8_t data;
} UART0;
For the Core, including the Core peripherals, ARM provides standard definitions.
For the vendor-specific stuff, there are varying degrees of interpretation of the standard style. But at least they're similar. Ish.
This should be similar to vendor-provided include files that you get for your 80051 chips, in principle. As an added bonus, there are many more IDEs that are "popular" for ARMs than there were for 8051, and you may need to get the various include files separately from the IDE, and the IDE separately from the compiler.
That's essentially the minimal "Chip level Support."
Most vendors have additional tools and libraries for supporting their peripherals. They all suck and everyone hates them, except for peripherals that are actually difficult to write your own code for, like Ethernet or USB. Then everyone still hates them for being bloated, buggy, and not really any easier to understand than the bare hardware, but at least "it's a mostly working example." Except they re-write them in incompatible ways every couple of years. Sigh.
(One of the first difficulties that you're likely to run into is that ARM chips seem to have excesively complex clock systems: two crystals and several internall oscillators, DFLLs, DPLLs, and different clock routing, on/of control, and speeds for different peripherals. All documented by a hardware engineer that didn't understand software and was very proud of their hardware! Or you can use the library written by the software intern that didn't understand hardware, which is still obnoxious and might take 1k of code to get your CPU running at it's top speed. Sigh.)
Vendor libraries typically provide a layer of abstraction. But there's no commonality between different vendors. ARM made some attempts in CMSIS at vendor-independent abstractions, but they don't seem to be widely adopted.
There are some 3rd party libraries. I'm less familiar with them (other than Arduino. Which is a toy. A toy that provides better cross-vendor abstraction than most vendor libraries. Sigh.)
-how to integrate an RTOS into an existing project, is this something
which must be done manually, or some IDEs have some templates to do
this when starting a project?
There are SO MANY RTOSes for ARM. ARM has their own standard in CMSIS for RTOS-related calls; I'm not sure if it's popular, or exactly how much it covers. Vendors have their own RTOSes (TI-RTOS comes to mind.) (I'd probably avoid those, to avoid vendor lock-in.) Free-RTOS is free and seems to have a lot of support. MBedOS is also popular. Some of ARM chips (especially those with wireless networking support) have proprietary code that already uses some OS. (notably Nordic NRFchips have a radio stack based on MBedOS, and Arduino Support for those chips runs ON TOP of MBedOS.)
My general impression is that the existing "RTOS" offerings are "excessively complete", and probably a lot more complex than most people need for most things.
-how to create libraries which can be used in other projects
Current style seems to mostly source-level libraries with conditional compilation for several chips. You either copy or symlink the library source code into your project, compile it with appropriate -Doption=value settings, and link it with the project. You can also have binary libraries, of course, but they tend to be less flexible. You'll get a full-featured C library with all the mixed-precision, floating point, and posix code that you might want. Several of them, in fact. And a very large set of generic C libraries written over the last 50 years that "probably work." Unlike many 8bit microcontrollers, ARMs don't run into show-stoppers like "the stack is only 256 bytes", or "I can't have contiguous arrays longer than 4k", or "I couldn't possible fit dynamic memory allocation in there."
-how to manipulate firmware images at lower level.
SWD is standard debugging hardware, and there's a standard comm protocol that goes with it. This is more-or-less JTAG, and it gives you the ability to manipulate internal memory and registers of the ARM chips. There are lots of options for doing this sort of base-level access. But this does NOT include programming flash, which usually involves a vendor-specific "non volatile memory controller." Many of the SWD options include flash programming for many chips, usually either by manipulating the NVM controller directly, or by uploading and executing short pieces of code into/from RAM. And there are many bootloaders - nearly all ARM chips can write their own flash. After you have basic code and/or bootloader in the chip, you have the same options for loading "other image-like data" as on any other system. I don't *think* that the JTAG-like properties of SWD extend to boundry-scan-like manipulation of other chips in a chain.
If you have any advice (youtube courses, other type of courses, etc) it would be helpful.
Well, there have been intersting discussions here, and in otehr fora.
I rather enjoyed the "Ghetto Style STM32" and "One Dollar One Minute ARM" threads here (and created this:
https://github.com/WestfW/Minimal-ARM - it has pointers to the threads.)(and this:
https://github.com/WestfW/SAMD10-experiments )
I liked the UTEXAS "Embedded System - Shape the World" MOOC (
https://courses.edx.org/courses/UTAustinX/UT.6.02x/1T2015/course/ ), which is probably mostly old-hat for you, but has a good intro to an ARM chip. And it's follow on about RTOS:
https://courses.edx.org/courses/course-v1:UTAustinX+UT.RTBN.12.01x+3T2016/course/ which specifically talks about RTOS primitives for ARM.)
The various Arduino Cores (and libraries) are open-source and "educational" to look at, especially WRT the differences in implementations. (Let's see. Arduino Due was built on top of Atmel's "libsam" vendor library (which has otherwise been wiped from the face of the earth.) SAMD cores are mostly bare-metal. The Maple Arduino core was written on top of one of the old STM vendor libraries, then re-written on bare metal due to performance issues (and perceived licensing problems?) Then it was taken over by others and many chips were added, and most recently (?) ST took control and has put it back on top of a newer vendor library. The Nordic code runs on top of MBedOS, and TI has multitasking version for MPS432 built on top of TI-RTOS.