Symmetry Autumn of Code
Mike Franklin
slavo5150 at yahoo.com
Mon Jul 23 07:20:58 UTC 2018
On Monday, 23 July 2018 at 06:00:14 UTC, Zheng (Vic) Luo wrote:
> Thank you for the suggestion. Previously I interned at a VR
> company and had some experiences writing code related to
> graphics, but I don't have any experience on embedded system
> programming, so I was wondering that do I need to buy a
> microcontroller or just testing it on PC would be enough? If
> it's the former one, could you give some suggestions on the
> starter kit?
Well, I won't be the one paying you, and I don't think I'll be
the one evaluating your work, so I don't think my opinion
matters, but as the one who proposed the idea, I'll just explain
my point of view.
Microcontrollers have limited CPU and memory resources.
Generally, they operate by filling a dedicated buffer in RAM
(width * height * pixel_format_size) with pixel data. The size
and format of the pixel data is generally decided at compile-time
based on the needs of the application. Some microcontrollers
have a dedicated hardware peripheral to aid in the blitting and
blending of pixel data, but most don't. So, for all intents and
purposes, this project is a software rasterizer in D; you
definitely won't find any CUDA cores here.
Understanding the capabilities and limitations of the
microcontrollers will give you some perspective and understanding
about the design tradeoffs you will most certainly need to make,
but, once you have that perspective, in the end, you're just
filling a buffer with pixel data, and I don't see why one
couldn't do the vast majority (if not all) of development for
that on their PC.
That being said, getting a low-speed MCU with as little memory as
256KB animating an LCD display can be a thrilling experience. If
you're interested, I suggest obtaining one of the STM32 Discovery
Kits with a built-in LCD screen. See
https://www.st.com/en/evaluation-tools/stm32-mcu-discovery-kits.html?querycriteria=productId=LN1848 (Typically one ofSTM32F4 or STM32F7 models)
This is the one that I have, and it only costs about $30:
https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-discovery-kits/32f429idiscovery.html#samplebuy-scroll Furthermore, I've already created the platform code for you at https://github.com/JinShil/stm32f42_discovery_demo, so you should just need to import your library to main.d and try it out.
Mike
More information about the Digitalmars-d-announce
mailing list