OpenNuvoton / N32926_NonOS_BSP

Non-OS SDK/BSP for N32926 Microprocessor
5 stars 7 forks source link

How to TrueStudio enviorment Setting ?? #2

Closed AoAo200 closed 4 years ago

AoAo200 commented 4 years ago

I'm download 329x NonOs_Bsp. I executed the Truestudio Project file in the example file. But we built it, unfortunately nothing happened. The message window says 'Nothing to build for project Gpio'. Perhaps the problem is caused by environmental variables and toolchain. I'm sorry but can you tell me? Toolchain, copmill (Gcc), environment variables, etc. to be installed...

Please..

kchuang1 commented 4 years ago

Hi,

We don't support Truestudio project. Please try Keil or Eclipse which provides project in the BSP.

AoAo200 commented 4 years ago

First, I can't use Keil." (No license.) Maybe it's because the true studio is eclipse-based. However, the toolchain and cross compiler environment variables should be set. Could you please send me the settings you used?

kchuang1 commented 4 years ago

You can refer https://github.com/OpenNuvoton/N9H26_emWin_NonOS/blob/master/N9H26%20Readme.pdf section 1.2 for the Eclipse environment setup. They use the same Eclipse environment.

By the way, below is my environment variable setting. C:\Program Files (x86)\GNU ARM Eclipse\Build Tools\2.8-201611221915\bin;C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q1-update\bin;C:/Program Files/Java/jre1.8.0_201/bin/server;C:/Program Files/Java/jre1.8.0_201/bin;C:/Program Files/Java/jre1.8.0_201/lib/amd64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\eclipse

AoAo200 commented 4 years ago

Thank you very much for your reply.

However, I couldn't make a mistake because there was a Path Error during Eclipse Building on the window. Instead, Eclipse Build was successful on the Linux operating system.

I'll close the current issue as soon as it's done on Windows.

I have additional questions.

  1. Build was completed on Linux, but there was no result such as bin file. Is there a way to set it up?
  2. N32926 has a JTAG port, is it possible to debug with JTAG? If you have a manual for connecting, please let me know.
kchuang1 commented 4 years ago

Hi,

  1. I have no experience to build with Linux environment. So, I have no idea about it.
  2. Yes, it can debug with JTAG. Please refer same document of N9H26 readme for section 1.1 and page 7~ 9 for the J-Link.
AoAo200 commented 4 years ago

I think the outcome of Eclipse will be the same. First of all, I am constantly trying to compile on Windows.

I'll set it up and check as you said. Does it download to N32926 mpu if I press Debug after build?

Also after building, I want to get a Bin file. Is Bin file created when it is normally built? (Reason: For Update after modifying FW)

kchuang1 commented 4 years ago

Does it download to N32926 mpu if I press Debug after build? --> Yes.

It will generate the binary file if you build the code under Example folder.

AoAo200 commented 4 years ago

Compiler problem resolved. Remove Eclipse and install Toolchain (gcc-arm-none-eabi-9-2020-q2-update-win32). Building tool installation (gnuarmeclipse-build-tools-win64-2.8-201611221915-setup) was successful.

Make error occurred when building GPIO of N32926 folder. //////////////////////////////////////////////////////////////////////////// Invoking: GNU ARM Cross Create Flash Image arm-none-eabi-objcopy -O binary "GPIO.elf" "GPIO.bin" arm-none-eabi-objcopy: 'GPIO.elf': No such file make[1]: [GPIO.bin] Error 1 makefile:55: recipe for target 'GPIO.bin' failed make: [all] Error 2 makefile:40: recipe for target 'all' failed "make all" terminated with exit code 2. Build might be incomplete. //////////////////////////////////////////////////////////////////////////// As above, an error occurred.

To import from Eclipse: It was done using File -> openProject File System -> Directory .

How do I open it when I run Eclipse?

AoAo200 commented 4 years ago

!! I changed the download path and the problem was solved. (An extra parenthesis has caused a problem with Makefile.) /////////////////////Compile Complete////////////////////// make all make --no-print-directory pre-build arm-none-eabi-cpp -E -DN32926_64MB=1 -P D:/TEST/N32926_NonOS_BSP-master/GPIO/Example/GCC/../../../GCC/gcc_arm_SRAM.ld -o D:/TEST/N32926_NonOS_BSP-master/GPIO/Example/GCC/N32926/gcc_arm_SRAM_N32926_64MB.ld

make --no-print-directory main-build Building target: GPIO.elf Invoking: GNU ARM Cross C Linker arm-none-eabi-gcc -mcpu=arm926ej-s -marm -mlittle-endian -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -T D:/TEST/N32926_NonOS_BSP-master/GPIO/Example/GCC/N32926/gcc_arm_SRAM_N32926_64MB.ld -Xlinker --gc-sections -L"D:/TEST/N32926_NonOS_BSP-master/GPIO/Example/GCC/../../Lib" -L"D:/TEST/N32926_NonOS_BSP-master/GPIO/Example/GCC/../../../SYSLIB/Lib" -Wl,-Map,"GPIO.map" --specs=nano.specs --specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group -o "GPIO.elf" ./Startup/Startup_GCC.o ./Src/gpio.o -lW55FA92_SYSLib -lW55FA92_GPIO Finished building target: GPIO.elf

Invoking: GNU ARM Cross Create Flash Image arm-none-eabi-objcopy -O binary "GPIO.elf" "GPIO.bin" Finished building: GPIO.bin

Invoking: GNU ARM Cross Print Size arm-none-eabi-size --format=berkeley "GPIO.elf" text data bss dec hex filename 7712 414 67100728 67108854 3fffff6 GPIO.elf Finished building: GPIO.siz ////////////////////////////////////////////////////////////////////////////////////////////////

As shown above, compilation is completed and warning is generated. ////////////////////Warning///////////////// Invalid project path: Duplicate path entries found (/GPIO [Include path] isSystemInclude:true includePath:D:/TEST/N32926_NonOS_BSP-master/GPIO/Lib), path: [/GPIO]. ////////////////////////////////////

Are the files created as below normal compilation situation? /////////////////////////Files/////////////////////// gcc_arm_SRAM_N32926_64MB.ld GPIO.bin GPIO.elf GPIO.map ////////////////////////////////////////////////

I want to ask you one last question. 1.Using JTAG Debug

kchuang1 commented 4 years ago
  1. warning can be ignored.
  2. Yes for those file.
  3. J-Link is used for source level debug. You can use it in Keil/IAR/Eclipse if driver is installed correctly. J-Link only download the code to SDRAM for execution not the NAND or SD storage. It is different from the NAND/SD booting flow.

If you program the binary file into NAND/SD storage, it will follow the booting sequence as document. If LOGO or NVTLoader is not programmed into NAND/SD, it will not execute. The executed file is dependent on what you prepare in the NAND/SD.

AoAo200 commented 4 years ago

Thanks to you, I finished debugging through J-link.

But instead of uploading Loader and Logo, using NAND, It is not possible to download to DemoBoard. I'll ask the company about this.

Thank you for your answer, and we will end the issue.

Have a nice day~