<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Building from the command line cleans the Debug configuration and builds the Release Configuration in MCUXpresso General</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/Building-from-the-command-line-cleans-the-Debug-configuration/m-p/830211#M995</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Curtis,&lt;/P&gt;&lt;P&gt;my projects usually only have a 'Debug' build configuration, as for me a 'Debug' and 'Release' do not make much sense (&lt;A class="link-titled" href="https://mcuoneclipse.com/2012/06/01/debug-vs-release/" title="https://mcuoneclipse.com/2012/06/01/debug-vs-release/"&gt;Debug vs. Release? | MCU on Eclipse&lt;/A&gt;). I tried to reproduce what you see, and my results are a bit different. It seems that Eclipse CDT has some flaws (or I don't get it?) depending on if you call it with the project name only, or with the build target.&lt;/P&gt;&lt;P&gt;I have extended/documented what I see in &lt;A class="link-titled" href="https://mcuoneclipse.com/2017/08/03/building-eclipse-and-mcuxpresso-ide-projects-from-the-command-line/" title="https://mcuoneclipse.com/2017/08/03/building-eclipse-and-mcuxpresso-ide-projects-from-the-command-line/"&gt;Building Eclipse and MCUXpresso IDE Projects from the Command Line | MCU on Eclipse&lt;/A&gt;&amp;nbsp; and as well updated the files on GitHub (&lt;A class="link-titled" href="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/MCUXpresso/CmdLineBuild" title="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/MCUXpresso/CmdLineBuild"&gt;mcuoneclipse/Examples/MCUXpresso/CmdLineBuild at master · ErichStyger/mcuoneclipse · GitHub&lt;/A&gt;). In a nutshell:&lt;/P&gt;&lt;P&gt;if you want to do a clean on a specific build target, you need to call it with -cleanBuil Project/Target first followed by a -build Project/Target.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Oct 2018 06:27:26 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2018-10-24T06:27:26Z</dc:date>
    <item>
      <title>Building from the command line cleans the Debug configuration and builds the Release Configuration</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Building-from-the-command-line-cleans-the-Debug-configuration/m-p/830210#M994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using a batch script (&lt;A href="https://github.com/ErichStyger/mcuoneclipse/blob/master/Examples/MCUXpresso/CmdLineBuild/build_from_command_line.bat" rel="nofollow noopener noreferrer" target="_blank"&gt;based off this&lt;/A&gt;) to build my firmware from the command line.&amp;nbsp; I want to a clean build every time.&lt;/P&gt;&lt;P&gt;This is the batch script:&lt;/P&gt;&lt;PRE&gt;:: Batch file to build an Eclipse project from the command line on Windows
:: Example for using MCUXpresso IDE
@echo off
:: path to GNU tools and compiler: arm-none-eabi-gcc.exe, ....
SET TOOLCHAIN_PATH=C:\nxp\MCUXpressoIDE_10.2.1_795\ide\tools\bin
:: path to MAKE
SET MAKE_PATH=C:\nxp\MCUXpressoIDE_10.2.1_795\ide\msys\bin
:: variable to the command line Eclipse IDE executable
SET IDE=C:\nxp\MCUXpressoIDE_10.2.1_795\ide\mcuxpressoidec.exe
:: variable for the main firmware path
SET HOST_FIRMWARE=.\Host_MCU\RTCP_Host

echo %PATH%|findstr /i /c:"%TOOLCHAIN_PATH:"=%"&amp;gt;nul || set PATH=%PATH%;%TOOLCHAIN_PATH%;%MAKE_PATH%

ECHO Building main firmware
"%IDE%" -nosplash --launcher.suppressErrors -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import "%HOST_FIRMWARE%" -cleanBuild RTCP_Host/Release&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is this will clean the Debug configuration and build the Release version of the firmware, which is not what I expect at all.&amp;nbsp; This is with MCUXpresso IDE v10.2.1 [Build 795]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the output from executing the above batch file.&amp;nbsp; You can clearly see it cleans the Debug configuration and builds the Release configuration.&amp;nbsp; How can I clean and build the Release configuration from the command line?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;Building main firmware
Opening 'RTCP_Host'.
10:44:14 **** Clean-only build of configuration Debug for project RTCP_Host ****
make -r -j8 clean
rm -rf&amp;nbsp; ./startup/startup_mkv31f51212.o&amp;nbsp; ./source/MT25Q.o ./source/RTCP_BLE_Frame_Comm.o ./source/RTCP_BSP_ADC.o ./source/RTCP_BSP_Timers.o ./source/RTCP_CRC_16.o ./source/RTCP_Cmd_Process.o ./source/RTCP_UART_Interrupt_Handler.o ./source/main.o&amp;nbsp; ./drivers/fsl_adc16.o ./drivers/fsl_clock.o ./drivers/fsl_cmp.o ./drivers/fsl_common.o ./drivers/fsl_crc.o ./drivers/fsl_dac.o ./drivers/fsl_dmamux.o ./drivers/fsl_dspi.o ./drivers/fsl_dspi_cmsis.o ./drivers/fsl_dspi_edma.o ./drivers/fsl_edma.o ./drivers/fsl_ewm.o ./drivers/fsl_flexbus.o ./drivers/fsl_ftfx_cache.o ./drivers/fsl_ftfx_controller.o ./drivers/fsl_ftfx_flash.o ./drivers/fsl_ftfx_flexnvm.o ./drivers/fsl_ftm.o ./drivers/fsl_gpio.o ./drivers/fsl_i2c.o ./drivers/fsl_i2c_cmsis.o ./drivers/fsl_i2c_edma.o ./drivers/fsl_llwu.o ./drivers/fsl_lptmr.o ./drivers/fsl_lpuart.o ./drivers/fsl_lpuart_cmsis.o ./drivers/fsl_lpuart_edma.o ./drivers/fsl_pdb.o ./drivers/fsl_pit.o ./drivers/fsl_pmc.o ./drivers/fsl_rcm.o ./drivers/fsl_rnga.o ./drivers/fsl_sim.o ./drivers/fsl_smc.o ./drivers/fsl_uart.o ./drivers/fsl_uart_cmsis.o ./drivers/fsl_uart_edma.o ./drivers/fsl_vref.o ./drivers/fsl_wdog.o&amp;nbsp; ./board/board.o ./board/clock_config.o ./board/peripherals.o ./board/pin_mux.o&amp;nbsp; ./CMSIS/system_MKV31F51212.o&amp;nbsp; ./startup/startup_mkv31f51212.d&amp;nbsp; ./source/MT25Q.d ./source/RTCP_BLE_Frame_Comm.d ./source/RTCP_BSP_ADC.d ./source/RTCP_BSP_Timers.d ./source/RTCP_CRC_16.d ./source/RTCP_Cmd_Process.d ./source/RTCP_UART_Interrupt_Handler.d ./source/main.d&amp;nbsp; ./drivers/fsl_adc16.d ./drivers/fsl_clock.d ./drivers/fsl_cmp.d ./drivers/fsl_common.d ./drivers/fsl_crc.d ./drivers/fsl_dac.d ./drivers/fsl_dmamux.d ./drivers/fsl_dspi.d ./drivers/fsl_dspi_cmsis.d ./drivers/fsl_dspi_edma.d ./drivers/fsl_edma.d ./drivers/fsl_ewm.d ./drivers/fsl_flexbus.d ./drivers/fsl_ftfx_cache.d ./drivers/fsl_ftfx_controller.d ./drivers/fsl_ftfx_flash.d ./drivers/fsl_ftfx_flexnvm.d ./drivers/fsl_ftm.d ./drivers/fsl_gpio.d ./drivers/fsl_i2c.d ./drivers/fsl_i2c_cmsis.d ./drivers/fsl_i2c_edma.d ./drivers/fsl_llwu.d ./drivers/fsl_lptmr.d ./drivers/fsl_lpuart.d ./drivers/fsl_lpuart_cmsis.d ./drivers/fsl_lpuart_edma.d ./drivers/fsl_pdb.d ./drivers/fsl_pit.d ./drivers/fsl_pmc.d ./drivers/fsl_rcm.d ./drivers/fsl_rnga.d ./drivers/fsl_sim.d ./drivers/fsl_smc.d ./drivers/fsl_uart.d ./drivers/fsl_uart_cmsis.d ./drivers/fsl_uart_edma.d ./drivers/fsl_vref.d ./drivers/fsl_wdog.d&amp;nbsp; ./board/board.d ./board/clock_config.d ./board/peripherals.d ./board/pin_mux.d&amp;nbsp; ./CMSIS/system_MKV31F51212.d&amp;nbsp; RTCP_Host.axf

10:44:15 Build Finished (took 524ms)

10:44:15 **** Build of configuration Release for project RTCP_Host ****
make -r -j8 all
Building target: RTCP_Host.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\Sources\RTCP\Software\Code\Firmware\POCs\Host_MCU\RTCP_Host\libs" -Xlinker -Map="RTCP_Host.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -Xlinker --sort-section=alignment -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -T "RTCP_Host_Release.ld" -o "RTCP_Host.axf"&amp;nbsp; ./startup/startup_mkv31f51212.o&amp;nbsp; ./source/MT25Q.o ./source/RTCP_BLE_Frame_Comm.o ./source/RTCP_BSP_ADC.o ./source/RTCP_BSP_Timers.o ./source/RTCP_CRC_16.o ./source/RTCP_Cmd_Process.o ./source/RTCP_UART_Interrupt_Handler.o ./source/main.o&amp;nbsp; ./drivers/fsl_adc16.o ./drivers/fsl_clock.o ./drivers/fsl_cmp.o ./drivers/fsl_common.o ./drivers/fsl_crc.o ./drivers/fsl_dac.o ./drivers/fsl_dmamux.o ./drivers/fsl_dspi.o ./drivers/fsl_dspi_cmsis.o ./drivers/fsl_dspi_edma.o ./drivers/fsl_edma.o ./drivers/fsl_ewm.o ./drivers/fsl_flexbus.o ./drivers/fsl_ftfx_cache.o ./drivers/fsl_ftfx_controller.o ./drivers/fsl_ftfx_flash.o ./drivers/fsl_ftfx_flexnvm.o ./drivers/fsl_ftm.o ./drivers/fsl_gpio.o ./drivers/fsl_i2c.o ./drivers/fsl_i2c_cmsis.o ./drivers/fsl_i2c_edma.o ./drivers/fsl_llwu.o ./drivers/fsl_lptmr.o ./drivers/fsl_lpuart.o ./drivers/fsl_lpuart_cmsis.o ./drivers/fsl_lpuart_edma.o ./drivers/fsl_pdb.o ./drivers/fsl_pit.o ./drivers/fsl_pmc.o ./drivers/fsl_rcm.o ./drivers/fsl_rnga.o ./drivers/fsl_sim.o ./drivers/fsl_smc.o ./drivers/fsl_uart.o ./drivers/fsl_uart_cmsis.o ./drivers/fsl_uart_edma.o ./drivers/fsl_vref.o ./drivers/fsl_wdog.o&amp;nbsp; ./board/board.o ./board/clock_config.o ./board/peripherals.o ./board/pin_mux.o&amp;nbsp; ./CMSIS/system_MKV31F51212.o&amp;nbsp;&amp;nbsp; -larm_cortexM4lf_math
Memory region&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used Size&amp;nbsp; Region Size&amp;nbsp; %age Used
&amp;nbsp;&amp;nbsp; PROGRAM_FLASH:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10768 B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 464 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.27%
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SRAM_UPPER:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9648 B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14.72%
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SRAM_LOWER:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 GB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00%
Finished building target: RTCP_Host.axf

make --no-print-directory post-build
Performing post-build steps
arm-none-eabi-size "RTCP_Host.axf"; # arm-none-eabi-objcopy -v -O binary "RTCP_Host.axf" "RTCP_Host.bin" ; # checksum -p MKV31F512xxx12 -d "RTCP_Host.bin";
&amp;nbsp;&amp;nbsp; text&amp;nbsp;&amp;nbsp;&amp;nbsp; data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bss&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dec&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hex filename
&amp;nbsp; 10552&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 216&amp;nbsp;&amp;nbsp;&amp;nbsp; 9432&amp;nbsp;&amp;nbsp; 20200&amp;nbsp;&amp;nbsp;&amp;nbsp; 4ee8 RTCP_Host.axf

10:44:17 Build Finished (took 1s.720ms)

Saving workspace&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2018 14:48:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Building-from-the-command-line-cleans-the-Debug-configuration/m-p/830210#M994</guid>
      <dc:creator>curtis_hendrix</dc:creator>
      <dc:date>2018-10-05T14:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Building from the command line cleans the Debug configuration and builds the Release Configuration</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Building-from-the-command-line-cleans-the-Debug-configuration/m-p/830211#M995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Curtis,&lt;/P&gt;&lt;P&gt;my projects usually only have a 'Debug' build configuration, as for me a 'Debug' and 'Release' do not make much sense (&lt;A class="link-titled" href="https://mcuoneclipse.com/2012/06/01/debug-vs-release/" title="https://mcuoneclipse.com/2012/06/01/debug-vs-release/"&gt;Debug vs. Release? | MCU on Eclipse&lt;/A&gt;). I tried to reproduce what you see, and my results are a bit different. It seems that Eclipse CDT has some flaws (or I don't get it?) depending on if you call it with the project name only, or with the build target.&lt;/P&gt;&lt;P&gt;I have extended/documented what I see in &lt;A class="link-titled" href="https://mcuoneclipse.com/2017/08/03/building-eclipse-and-mcuxpresso-ide-projects-from-the-command-line/" title="https://mcuoneclipse.com/2017/08/03/building-eclipse-and-mcuxpresso-ide-projects-from-the-command-line/"&gt;Building Eclipse and MCUXpresso IDE Projects from the Command Line | MCU on Eclipse&lt;/A&gt;&amp;nbsp; and as well updated the files on GitHub (&lt;A class="link-titled" href="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/MCUXpresso/CmdLineBuild" title="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/MCUXpresso/CmdLineBuild"&gt;mcuoneclipse/Examples/MCUXpresso/CmdLineBuild at master · ErichStyger/mcuoneclipse · GitHub&lt;/A&gt;). In a nutshell:&lt;/P&gt;&lt;P&gt;if you want to do a clean on a specific build target, you need to call it with -cleanBuil Project/Target first followed by a -build Project/Target.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 06:27:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Building-from-the-command-line-cleans-the-Debug-configuration/m-p/830211#M995</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2018-10-24T06:27:26Z</dc:date>
    </item>
  </channel>
</rss>

