Hi
I have been involved with over 250 product developments with various Kinetis parts over the last 8 years and have always used the total memory as a single contiguous area - I think that the SDK is playing extremely safe to sometimes throw away half or a quarter of its potential RAM to ensure that a potential misalignment case couldn't result in a problem.
If one ensures alignment (there is no reason why not to since the Cortex M0+ will hard fault on any misaligned accesses anyway and the Cortex-M4 parts will work less efficiently) there is little or even no risk..
Misaligned accesses don't in fact hard fault on the K22, even across the boundary of the two RAM controllers. They just give bad data, which can then cause a problem of course if used. This can be seen very easily. If you fill the memory with a pattern as such:
Memory Display
md 1ffffffc l 2 {long word read of two works at the address 0x1ffffffc}
0x1ffffffc 12345678 aabbccdd .4Vx....
Now watch how K22 (Cortex-M4) misaligned reads are handled:
md 1ffffffc l 1
Memory Display
0x1ffffffc 12345678 .4Vx
md 1ffffffd l 1
Memory Display
0x1ffffffd fc123456 ..4V
md 1ffffffe l 1
Memory Display
0x1ffffffe fffc1234 ...4
md 1fffffff l 1
Memory Display
0x1fffffff 02fffc12 ....
md 20000000 l 1
Memory Display
0x20000000 aabbccdd ....
Which shows that access are possible (without hard fault) but the misaligned access across the boundary returns some bad data.
I was always worried about burst DMA across the boundary but never had an issue since my DMA routines ensure that they always use aligned transfers and if I remember correctly I also tested aligned DMA across the boundary without finding issues.
Since I work with a number of IDEs and compilers I never configure in linker script files since that makes for problems of portability. Instead I always use a malloc() version that allows things like alignment to be handled automatically and I can also ensure that any memory allocated for use by things like USB is not only correctly aligned but also avoids being allocated across such a boundary. I never had to use it though.....
Therefore I agree that there should be no reason to not be able to work with a contiguous memory as long as basic alignment rules are observed (good practice anyway). But I don't know whether the SDK respects all alignment rules (?)
Regards
Mark
[uTasker project developer for Kinetis and i.MX RT]