Quiz: STM32CubeIDE Setup and Project Structure-Free Embedded C Tutorial Online

Need Help or More Information?

Questions about this free C programming course, embedded C training or career guidance? Get in touch.

MODULE 1 – LESSON 1.2 – QUIZ

Quiz: STM32CubeIDE Setup and Project Structure

MCQs, fill-in-blanks, true/false, and interview questions on IDE setup, startup files, linker scripts, and the build process.

15
MCQ
8
Fill in Blanks
8
True / False
10
Interview Q&A

Score Tracker

0
Correct
0
Wrong
0
Attempted

Section 1: Multiple Choice Questions

1. What does the linker script’s MEMORY block define?

2. What is the first thing the Reset_Handler does when the STM32F407 powers on?

3. What GCC flag enables generation of full debug symbols (best for step-through debugging)?

4. Which protocol does ST-LINK use to communicate with the STM32F407 for debugging?

5. What does the __attribute__((weak)) modifier do when applied to a function?

6. In a linker script, what does >RAM AT> FLASH mean for the .data section?

7. What does the arm-none-eabi-size command show?

8. What is the role of the BSRR register compared to the ODR register for GPIO output?

9. Which file extension contains code, data, AND debug symbols all in one?

10. What does the -ffunction-sections -fdata-sections + --gc-sections combination achieve?

11. What is OpenOCD and what role does it play in STM32 debugging?

12. The GCC flag -mcpu=cortex-m4 does what?

13. What happens if you press F6 (Step Over) in the debugger when the current line contains a function call?

14. What is the vector table and where must it be placed on STM32F407?

15. What does KEEP(*(.isr_vector)) in the linker script do?

Section 2: Fill in the Blanks

1. The GCC ARM compiler executable is called

2. The section that stores code and read-only data in Flash is called

3. The two-wire ARM debug protocol used by ST-LINK is called

4. To convert an ELF file to a raw binary, use: arm-none-eabi- -O binary

5. The linker script keyword that prevents a section from being garbage-collected is

6. In BSRR, to clear (reset) pin PA5, write 1 to bit position of the BSRR register.

7. The startup assembly file handles the vector table and which is the first code to run on reset.

8. The GCC flag -mthumb tells the compiler to generate instructions instead of 32-bit ARM instructions.

Section 3: True or False

1. STM32CubeIDE requires you to install the GCC ARM toolchain separately from the official ARM website.

2. The .bss section stores initial values for uninitialized global variables in Flash.

3. You can use the Memory Browser in STM32CubeIDE to read and write peripheral registers directly during a debug session.

4. A program compiled with Debug settings (-O0 -g3) will behave identically to one compiled with Release settings (-O2) in all cases.

5. The .elf file is the recommended format for programming production units in the field.

6. On an STM32F407, if you write to GPIOA registers without first enabling the GPIOA clock in RCC_AHB1ENR, the write silently has no effect.

7. The linker script must be rewritten every time you add a new source file to the project.

8. The STM32F407 Discovery board’s on-board ST-LINK circuit is itself a separate STM32 MCU (STM32F103).

Section 4: Interview Questions

Q1: Explain the role of the linker script in an embedded project. Why can’t you just compile and run? +
Q2: A program works in Debug build but fails in Release build. What is the most likely cause? +
Q3: What is the difference between .data and .bss sections? How does each affect Flash usage? +
Q4: Why use BSRR instead of ODR for GPIO output in interrupt-driven code? +
Q5: Describe the complete tool chain: from .c source file to executing firmware on the board. +
Q6: What would happen if the linker script had the wrong Flash start address (e.g., 0x00000000 instead of 0x08000000)? +
Q7: How do you override a default (weak) interrupt handler in STM32CubeIDE? +
Q8: What is semihosting? When is it useful and what are its limitations? +
Q9: How do you find which functions are using the most Flash in your embedded project? +
Q10: Explain what HardFault is and list 3 common causes in STM32 embedded code. +

Module 1 Complete!

You have finished both lessons of Module 1. Proceed to Module 2: Number Systems and Data Types to master binary, hex, and C data types for embedded systems.

Need Help or More Information?

Questions about this free C programming course, embedded C training or career guidance? Get in touch.

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *