Adapting Compilation Chain from MPLAB X IDE to VS Code with MPLAB Plugins

My code builds fine in the MPLAB X IDE (v5.454), but for usability I want to use VS Code with the MPLAB extensions.

My requirements include the use of the xc32 compiler v2.40. The example video does not cover the use of a specific compiler.
I have that compiler installed, the path is C:/Program Files/Microchip/xc32/v2.40/bin/, but the VS Code IDE cannot find it.
I couldn’t find documentation on how to add it.

I learned in this stackoverflow reply, that I need to add the info into the task.json.

I am confused on how to add the content of all the nested Makefiles into a tasks.json.

Furthermore, I realized that the nested Makefiles are ignored by VS Code and the MPLAB plugins all together.

It is too much to manually add everything

How should I proceed?

Please find below the compilation output from the MPLAB X IDE.

All compiler related output from MPLAB X IDE

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/<my user>/<path to my project>/firmware/MY_PROJECT.X'
make  -f nbproject/Makefile-default.mk dist/default/production/MY_PROJECT.X.production.hex
make[2]: Entering directory 'C:/Users/<my user>/<path to my project>/firmware/MY_PROJECT.X'
"C:Program FilesMicrochipxc32v2.40binxc32-gcc.exe"    -g -x c -c -mprocessor=ATSAMRH71F20C  -ffunction-sections -fdata-sections -O1 -I"../src/init" -I"../src/config/default/system/dma" -I"../src/config/default" -I"../src/packs/ATSAMRH71F20C_DFP" -I"../src/packs/CMSIS/CMSIS/Core/Include" -I"../src/packs/CMSIS/" -I"../src/third_party/rtos/FreeRTOS/Source/include" -I"../src/third_party/rtos/FreeRTOS/Source/portable/GCC/SAM/CM7" -I"../src/memoryprotection" -I"../src/config/default/peripheral/abcd" -I"../src/packs/ATSAMRH71F20C_DFP/component" -I"../src/config/default/peripheral/rtc" -I"../src/tasks" -I"../src/memoryprotection" -I"../src/realtimeclock" -I"../src/eeprom" -I"../src/config/default/peripheral/mpu" -I"../src/spi" -I"../src/config/default/peripheral/xyz" -I"../src/config/default/peripheral/mnop" -I"../src/config/default/peripheral/supc" -I"../src/rice" -I"../src/config/default/peripheral/qspi" -I"../src/ccc" -I"../src/device" -I"../src/extflash" -Werror -Wall -MP -MMD -MF "build/default/production/_ext/14461671/sys_dma.o.d" -o build/default/production/_ext/14461671/sys_dma.o ../src/config/default/system/dma/sys_dma.c   -mdtcm=0x40000 -mitcm=0x20000 -DXPRJ_default=default      -mdfp="C:/Users/<my user>/.mchp_packs/Microchip/SAMRH71_DFP/2.1.105/samrh71c" -I "C:/Users/<my user>/.mchp_packs/ARM/CMSIS/5.4.0/CMSIS/Core/Include" 
... many more lines like this ...
"C:Program FilesMicrochipxc32v2.40binxc32-gcc.exe"    -g -x c -c -mprocessor=ATSAMRH71F20C  -ffunction-sections -fdata-sections -O1 -I"../src/init" -I"../src/config/default/system/dma" -I"../src/config/default" -I"../src/packs/ATSAMRH71F20C_DFP" -I"../src/packs/CMSIS/CMSIS/Core/Include" -I"../src/packs/CMSIS/" -I"../src/third_party/rtos/FreeRTOS/Source/include" -I"../src/third_party/rtos/FreeRTOS/Source/portable/GCC/SAM/CM7" -I"../src/memoryprotection" -I"../src/config/default/peripheral/abcd" -I"../src/packs/ATSAMRH71F20C_DFP/component" -I"../src/config/default/peripheral/rtc" -I"../src/tasks" -I"../src/memoryprotection" -I"../src/realtimeclock" -I"../src/eeprom" -I"../src/config/default/peripheral/mpu" -I"../src/spi" -I"../src/config/default/peripheral/xyz" -I"../src/config/default/peripheral/mnop" -I"../src/config/default/peripheral/supc" -I"../src/rice" -I"../src/config/default/peripheral/qspi" -I"../src/ccc" -I"../src/device" -I"../src/extflash" -Werror -Wall -MP -MMD -MF "build/default/production/_ext/404212886/FreeRTOS_tasks.o.d" -o build/default/production/_ext/404212886/FreeRTOS_tasks.o ../src/third_party/rtos/FreeRTOS/Source/FreeRTOS_tasks.c   -mdtcm=0x40000 -mitcm=0x20000 -DXPRJ_default=default      -mdfp="C:/Users/<my user>/.mchp_packs/Microchip/SAMRH71_DFP/2.1.105/samrh71c" -I "C:/Users/<my user>/.mchp_packs/ARM/CMSIS/5.4.0/CMSIS/Core/Include" 
"C:Program FilesMicrochipxc32v2.40binxc32-gcc.exe"    -g -x c -c -mprocessor=ATSAMRH71F20C  -ffunction-sections -fdata-sections -O1 -I"../src/init" -I"../src/config/default/system/dma" -I"../src/config/default" -I"../src/packs/ATSAMRH71F20C_DFP" -I"../src/packs/CMSIS/CMSIS/Core/Include" -I"../src/packs/CMSIS/" -I"../src/third_party/rtos/FreeRTOS/Source/include" -I"../src/third_party/rtos/FreeRTOS/Source/portable/GCC/SAM/CM7" -I"../src/memoryprotection" -I"../src/config/default/peripheral/abcd" -I"../src/packs/ATSAMRH71F20C_DFP/component" -I"../src/config/default/peripheral/rtc" -I"../src/tasks" -I"../src/memoryprotection" -I"../src/realtimeclock" -I"../src/eeprom" -I"../src/config/default/peripheral/mpu" -I"../src/spi" -I"../src/config/default/peripheral/xyz" -I"../src/config/default/peripheral/mnop" -I"../src/config/default/peripheral/supc" -I"../src/rice" -I"../src/config/default/peripheral/qspi" -I"../src/ccc" -I"../src/device" -I"../src/extflash" -Werror -Wall -MP -MMD -MF "build/default/production/_ext/1360937237/main.o.d" -o build/default/production/_ext/1360937237/main.o ../src/main.c   -mdtcm=0x40000 -mitcm=0x20000 -DXPRJ_default=default      -mdfp="C:/Users/<my user>/.mchp_packs/Microchip/SAMRH71_DFP/2.1.105/samrh71c" -I "C:/Users/<my user>/.mchp_packs/ARM/CMSIS/5.4.0/CMSIS/Core/Include" 
"C:Program FilesMicrochipxc32v2.40binxc32-gcc.exe"   -mprocessor=ATSAMRH71F20C -mno-device-startup-code -o dist/default/production/MY_PROJECT.X.production.elf build/default/production/_ext/14461671/sys_dma.o <path to other objectfile/object.o> build/default/production/_ext/404212886/FreeRTOS_tasks.o build/default/production/_ext/1360937237/main.o         -mdtcm=0x40000 -mitcm=0x20000 -DXPRJ_default=default      -Wl,--defsym=__MPLAB_BUILD=1,--script="ATSAMRH71F20C.ld",--defsym=_min_heap_size=512,--defsym=_min_stack_size=10240,--gc-sections,-Map="dist/default/production/MY_PROJECT.X.production.map",--report-mem,--memorysummary,dist/default/production/memoryfile.xml,-T,C:/Users/<my user>/< path to project folder>/firmware/MY_PROJECT.X/ATSAMRH71F20C.ld -mdfp="C:/Users/<my user>/.mchp_packs/Microchip/SAMRH71_DFP/2.1.105/samrh71c"
...
BUILD SUCCESSFUL (total time: 22s)
...

It seems that the numbers in the build/default/production/_ext/<number order a>/<object file a>.o change with every build.

I am new to how to configure such a complex project compilation and do bring a limited computer science background.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Adapting Compilation Chain from MPLAB X IDE to VS Code with MPLAB Plugins

My code builds fine in the MPLAB X IDE (v5.454), but for usability I want to use VS Code with the MPLAB extensions.

My requirements include the use of the xc32 compiler v2.40. The example video does not cover the use of a specific compiler.
I have that compiler installed, the path is C:/Program Files/Microchip/xc32/v2.40/bin/, but the VS Code IDE cannot find it.
I couldn’t find documentation on how to add it.

I learned in this stackoverflow reply, that I need to add the info into the task.json.

I am confused on how to add the content of all the nested Makefiles into a tasks.json.

Furthermore, I realized that the nested Makefiles are ignored by VS Code and the MPLAB plugins all together.

It is too much to manually add everything

How should I proceed?

Please find below the compilation output from the MPLAB X IDE.

All compiler related output from MPLAB X IDE

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/<my user>/<path to my project>/firmware/MY_PROJECT.X'
make  -f nbproject/Makefile-default.mk dist/default/production/MY_PROJECT.X.production.hex
make[2]: Entering directory 'C:/Users/<my user>/<path to my project>/firmware/MY_PROJECT.X'
"C:Program FilesMicrochipxc32v2.40binxc32-gcc.exe"    -g -x c -c -mprocessor=ATSAMRH71F20C  -ffunction-sections -fdata-sections -O1 -I"../src/init" -I"../src/config/default/system/dma" -I"../src/config/default" -I"../src/packs/ATSAMRH71F20C_DFP" -I"../src/packs/CMSIS/CMSIS/Core/Include" -I"../src/packs/CMSIS/" -I"../src/third_party/rtos/FreeRTOS/Source/include" -I"../src/third_party/rtos/FreeRTOS/Source/portable/GCC/SAM/CM7" -I"../src/memoryprotection" -I"../src/config/default/peripheral/abcd" -I"../src/packs/ATSAMRH71F20C_DFP/component" -I"../src/config/default/peripheral/rtc" -I"../src/tasks" -I"../src/memoryprotection" -I"../src/realtimeclock" -I"../src/eeprom" -I"../src/config/default/peripheral/mpu" -I"../src/spi" -I"../src/config/default/peripheral/xyz" -I"../src/config/default/peripheral/mnop" -I"../src/config/default/peripheral/supc" -I"../src/rice" -I"../src/config/default/peripheral/qspi" -I"../src/ccc" -I"../src/device" -I"../src/extflash" -Werror -Wall -MP -MMD -MF "build/default/production/_ext/14461671/sys_dma.o.d" -o build/default/production/_ext/14461671/sys_dma.o ../src/config/default/system/dma/sys_dma.c   -mdtcm=0x40000 -mitcm=0x20000 -DXPRJ_default=default      -mdfp="C:/Users/<my user>/.mchp_packs/Microchip/SAMRH71_DFP/2.1.105/samrh71c" -I "C:/Users/<my user>/.mchp_packs/ARM/CMSIS/5.4.0/CMSIS/Core/Include" 
... many more lines like this ...
"C:Program FilesMicrochipxc32v2.40binxc32-gcc.exe"    -g -x c -c -mprocessor=ATSAMRH71F20C  -ffunction-sections -fdata-sections -O1 -I"../src/init" -I"../src/config/default/system/dma" -I"../src/config/default" -I"../src/packs/ATSAMRH71F20C_DFP" -I"../src/packs/CMSIS/CMSIS/Core/Include" -I"../src/packs/CMSIS/" -I"../src/third_party/rtos/FreeRTOS/Source/include" -I"../src/third_party/rtos/FreeRTOS/Source/portable/GCC/SAM/CM7" -I"../src/memoryprotection" -I"../src/config/default/peripheral/abcd" -I"../src/packs/ATSAMRH71F20C_DFP/component" -I"../src/config/default/peripheral/rtc" -I"../src/tasks" -I"../src/memoryprotection" -I"../src/realtimeclock" -I"../src/eeprom" -I"../src/config/default/peripheral/mpu" -I"../src/spi" -I"../src/config/default/peripheral/xyz" -I"../src/config/default/peripheral/mnop" -I"../src/config/default/peripheral/supc" -I"../src/rice" -I"../src/config/default/peripheral/qspi" -I"../src/ccc" -I"../src/device" -I"../src/extflash" -Werror -Wall -MP -MMD -MF "build/default/production/_ext/404212886/FreeRTOS_tasks.o.d" -o build/default/production/_ext/404212886/FreeRTOS_tasks.o ../src/third_party/rtos/FreeRTOS/Source/FreeRTOS_tasks.c   -mdtcm=0x40000 -mitcm=0x20000 -DXPRJ_default=default      -mdfp="C:/Users/<my user>/.mchp_packs/Microchip/SAMRH71_DFP/2.1.105/samrh71c" -I "C:/Users/<my user>/.mchp_packs/ARM/CMSIS/5.4.0/CMSIS/Core/Include" 
"C:Program FilesMicrochipxc32v2.40binxc32-gcc.exe"    -g -x c -c -mprocessor=ATSAMRH71F20C  -ffunction-sections -fdata-sections -O1 -I"../src/init" -I"../src/config/default/system/dma" -I"../src/config/default" -I"../src/packs/ATSAMRH71F20C_DFP" -I"../src/packs/CMSIS/CMSIS/Core/Include" -I"../src/packs/CMSIS/" -I"../src/third_party/rtos/FreeRTOS/Source/include" -I"../src/third_party/rtos/FreeRTOS/Source/portable/GCC/SAM/CM7" -I"../src/memoryprotection" -I"../src/config/default/peripheral/abcd" -I"../src/packs/ATSAMRH71F20C_DFP/component" -I"../src/config/default/peripheral/rtc" -I"../src/tasks" -I"../src/memoryprotection" -I"../src/realtimeclock" -I"../src/eeprom" -I"../src/config/default/peripheral/mpu" -I"../src/spi" -I"../src/config/default/peripheral/xyz" -I"../src/config/default/peripheral/mnop" -I"../src/config/default/peripheral/supc" -I"../src/rice" -I"../src/config/default/peripheral/qspi" -I"../src/ccc" -I"../src/device" -I"../src/extflash" -Werror -Wall -MP -MMD -MF "build/default/production/_ext/1360937237/main.o.d" -o build/default/production/_ext/1360937237/main.o ../src/main.c   -mdtcm=0x40000 -mitcm=0x20000 -DXPRJ_default=default      -mdfp="C:/Users/<my user>/.mchp_packs/Microchip/SAMRH71_DFP/2.1.105/samrh71c" -I "C:/Users/<my user>/.mchp_packs/ARM/CMSIS/5.4.0/CMSIS/Core/Include" 
"C:Program FilesMicrochipxc32v2.40binxc32-gcc.exe"   -mprocessor=ATSAMRH71F20C -mno-device-startup-code -o dist/default/production/MY_PROJECT.X.production.elf build/default/production/_ext/14461671/sys_dma.o <path to other objectfile/object.o> build/default/production/_ext/404212886/FreeRTOS_tasks.o build/default/production/_ext/1360937237/main.o         -mdtcm=0x40000 -mitcm=0x20000 -DXPRJ_default=default      -Wl,--defsym=__MPLAB_BUILD=1,--script="ATSAMRH71F20C.ld",--defsym=_min_heap_size=512,--defsym=_min_stack_size=10240,--gc-sections,-Map="dist/default/production/MY_PROJECT.X.production.map",--report-mem,--memorysummary,dist/default/production/memoryfile.xml,-T,C:/Users/<my user>/< path to project folder>/firmware/MY_PROJECT.X/ATSAMRH71F20C.ld -mdfp="C:/Users/<my user>/.mchp_packs/Microchip/SAMRH71_DFP/2.1.105/samrh71c"
...
BUILD SUCCESSFUL (total time: 22s)
...

It seems that the numbers in the build/default/production/_ext/<number order a>/<object file a>.o change with every build.

I am new to how to configure such a complex project compilation and do bring a limited computer science background.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật