![]() ![]() They could just put all the generated code into Generated subfolder, with "don't edit" comments in the headers, and have a main.c that includes a generated header, and calls setup & such.Įdit: and what I ended up doing is I ended up using atmega32u4 board, even though I got my joystick code working fine with STM32.Our STM32 family of 32-bit Arm ® Cortex ® core-based microcontrollers and microprocessors are supported by a comprehensive set of software tools. ![]() But how it can be actually used, just generating snippets with it and copy pasting by hand?Įdit: And it's so close to being usable, it's maddening. Or their automatic clocks thing, I can get the damn thing set up to do USB device without a quartz, that's pretty cool. The dumb thing is, I actually like their pin editor thing! I can see pins and set functions to them, that's awesome. I don't get what it would be usable for if it's so weird to use for something so straightforward. All I'm doing is a HID joystick, which is probably the closest something can get to their sample without being literally their sample. Like they have an exec decide they should provide an IDE, then a product manager produce something unusable, and (seemingly competent) programmers write features for an overall useless concept? This is how everyone does generated code. ![]() Stm32cubemx segger embedded studio generator#Generated code shouldn't even be in the same file with user written code, in the first place if they want the project to work out of the box when created by the project wizard, they can just make a "main" that calls "cube_setup()", "cube_update()", and "cube_shutdown()", and add it to projects when project gets created, and then never modify it by the generator because it doesn't need to be modified. If the IDE makes you a folder that is not called "build" or something like that, nobody expects that folder with all its content to get nuked if you change some settings.Īdditionally as a separate but related issue the whole "user code begin" blocks approach is insane. What I didn't expect at all, is that files which aren't even auto generated (that I put there) are subject to getting nuked by the IDE, by default. Yeah, if you read my post you may notice that I did notice the "user code begin" blocks. On the other hand, the places to generate code are surrounded by capital letters comments "USER CODE BEGIN xxcc" "USER CODE END xxx". Got the joystick working and everything, then had to switch to custom HID because I don't want that auto generated mouse stuff, poof, code's gone, including new files, good thing I committed it to git. Is it at all usable for actual projects, other than via "generate code and copy it into another project and hope you'll never need that nice pin editing GUI again" workflow?Įdit: I'm not even doing anything particularly interesting, I was just experimenting with getting a joystick working "from scratch" using manufacturer's tools rather than Arduino. git gets deleted makes me think no place is safe). It is not clear where the hell can you even put your code so that it would be safe from deletion by the generator (having found someone reporting that. That just makes no sense at all code generation isn't something that got invented yesterday the way you deal with generated code is you #include it from user written code, not intermix user written and generated code delineated by comments. ![]() Instead of having the generated code neatly contained in some "generated" folder and be included from sample main.c that is not touched by the generator, it has those crazy comment sections in main.c for user written vs generated code. The whole code organization / workflow seems completely insane to me. It just wipes user source files, including ones that it didn't create in the first place, when changing things in the pin editor. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |