raspiduino / uARMRE

ARM emulator (running Linux) running on MRE platform (including Nokia S30+)
9 stars 1 forks source link

Do you still have ADS 1.2 compiler somewhere #4

Open veso266 opened 2 years ago

veso266 commented 2 years ago

Hello there, someone had given me Nokia 215 (not 4G KaiOS version) to play around

and I decided to try to write an app for it So after searched online I found your post on SO: https://stackoverflow.com/a/72823567/19734667

So I was wondering if you still have this Arms ADS compiler somewhere and if you could share it

Another question: did you ever figure out how to sign an app using RSA key instead of IMSI patch, since I sadly dont have a mini sim card at hand to put into, this is probably my only hope on running something on this phone

Thanks for Anwsering and Best Regards

raspiduino commented 2 years ago

not 4G KaiOS version

Good :)))

So I was wondering if you still have this Arms ADS compiler somewhere and if you could share it

Yes, but read this carefully before you choose that: If you just want to developing on Nokia, you can use GCC. It's free, open source, secure, and generating the much smaller binary than ARM ADS does, support standard C better, and it's much easier to search for error codes online.

The ARM ADS is not free. You can download it easily from ARM, here, but you will need a license from ARM (I don't know how much, but maybe they stop selling license for this). If you don't want to pay, you can cr@ck it easily :)), but that is illegal.

TL;DR: Use GCC if you just want to dev. Use ARM ADS if you really know what you are doing.

What is your choice?

Thanks!

raspiduino commented 2 years ago

Did you ever figure out how to sign an app using RSA key instead of IMSI patch

No, but I will ask XimikBoda

XimikBoda commented 2 years ago

Did you ever figure out how to sign an app using RSA key instead of IMSI patch

It's probably not possible right now, the certificate check is done too well The only way to find out the private key is to find an information leak somewhere, but given the low popularity of the platform, this is unlikely. Another option is to try to flash a new public key into the firmware (but I don’t know if there is an integrity check there) (and if the key is in a compressed memory area, this also complicates the task)

It will probably be easier to find a SIM card, a blocked one will do, the main thing is that the phone recognizes its presence and reads the IMSI

raspiduino commented 2 years ago

a blocked one will do

If you arrive in Vietnam, I will give you one, for free :))

veso266 commented 2 years ago

Hi there, I managed to find a SIM Card, and also a working ADS1.2 (since SDK documentation mentions to use ADS, not even sure how to swich to gcc (since there is no option for that in options) slika

then when I hit make it doesn't want to make due to some file that should be created automaticly missing BSCMAKE: error BK1506 : cannot open file '.\Debug\HelloWorld.sbr': No such file or directory

then after turning this browse information off according to this: https://stackoverflow.com/questions/109281/bscmake-error-bk1506-cannot-open-file-stdafx-sbr-no-such-file-or-directory

like this BrowseInformation="0"

in HelloWorld.vcproj

then errors became even more cryptic The system cannot find the path specified. (what path,.....)

so how did you setup your dev enviroment I just installed VS2008 Professional, then installed ADS1.2 and MRE_SDK found on some github issue

then configured VC directories according to this: https://github.com/UstadMobile/ustadmobile-mre I left ADS1.2 on default options slika

ARM Processor: 
Compiler Options:--o1 -g- -apcs /ropi/rwpi -cpu ARM7EJ-S 
Linker options: -info totals -rwpi -ropi -nodebug 

then I created a default VS project using slika

like Getting Started With MRE.pdf suggested (not sure what to pick for my Nokia 215 :smile:

so how did you setup your IDE (I am using Windows 11, maybe this is causing problems not sure)

raspiduino commented 2 years ago

not even sure how to swich to gcc (since there is no option for that in options)

Basically you can use any arm-none-eabi-*, go and download a compiler. For example, I use Sourcery CodeBench Lite for ARM EABI, but any compiler can be applied.

After download and setup a GCC compiler, it's now time to config.

In your MRE SDK V3.0.00\tools directory, open the file sys.ini in an editor: image

Find the line GCCPath= (usually line 63), and change it to the registry key of the compiler you installed. For example:

GCCPath="SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Sourcery CodeBench Lite for ARM EABI"

You need to find the "uninstall key" of the compiler (Google for this).

Open the MRE SDK 3.0 app (MRE launcher or something like that), and there will be a config button: image

A small window will appear, and you can choose GCC. I often tick the "Thumb command" button, not sure if it still works if you don't use it.

Good luck!

raspiduino commented 2 years ago

how did you setup your IDE

Good news: you don't need to use VS 2008 (the thing that costs you money) anymore! You can use (maybe) any version of Visual Studio you like, but requires a workaround.

Will update on this later

XimikBoda commented 2 years ago

About VS 2008, you can use VS 2008 express, it is free

yeppiidev commented 1 year ago

ive experienced the same problem while building but got it fixed with the use of GCC instead of ARM's compiler

yeppiidev commented 1 year ago

About VS 2008, you can use VS 2008 express, it is free

I think you can use ANY IDE and use the MreLauncher tool to compile your app. I've noticed that the tool relies on an assembly that's found with VS 2008 which it uses to open .vcproj files. Probably should work if you have VS 2008 express installed.

raspiduino commented 1 year ago

I use VS2022 with MRE SDK, but I have to create a custom script for building the app

yeppiidev commented 1 year ago

Can you share some details on how you would do that?

raspiduino commented 1 year ago

Here is a video of me building a MRE project from scratch using VS2022 and then run it in MODIS (MRE simulator)

Generally, you can generate and open MRE projects without even installing VS2008. So just do that.

For building MRE app for real phones

Copy this script to a new file named BuildApp.bat in the project's directory, then edit it according to your project:

@echo off
echo Building uARMRE
echo Precheck the Resource 
"C:\Program Files (x86)\MRE SDK V3.0.00\tools\ResEditor\CmdShell.exe" save  "D:\Data\dev\uARMRE\uARMRE.vcproj"
if not exist arm mkdir arm
if %errorlevel% NEQ 0 goto exit
echo     CC    gccmain.c
"D:\Data\dev\Sourcery_CodeBench_Lite_for_ARM_EABI\bin\arm-none-eabi-gcc" -static -c -fpic -mcpu=arm7tdmi-s -fvisibility=hidden -mthumb -mlittle-endian -Ofast -D__MRE_COMPILER_GCC__ -fno-exceptions -fno-non-call-exceptions -o "D:\Data\dev\uARMRE\arm\gccmain.o" -c "C:\Program Files (x86)\MRE SDK V3.0.00\lib\MRE30\src\gccmain.c"      -D _MINIGUI_LIB_ -D _USE_MINIGUIENTRY -D _NOUNIX_ -D _FOR_WNC -D __MRE_SDK__ -D   __MRE_VENUS_NORMAL__  -D  __MMI_MAINLCD_240X320__ -I "C:\Program Files (x86)\MRE SDK V3.0.00\include" -I "C:\Program Files (x86)\MRE SDK V3.0.00\include\service" -I "C:\Program Files (x86)\MRE SDK V3.0.00\include" -I "C:\Program Files (x86)\MRE SDK V3.0.00\include\service" -I "D:\Data\dev\uARMRE\include" -I "D:\Data\dev\uARMRE\include\service" -I "D:\Data\dev\uARMRE\include\component" -I "D:\Data\dev\uARMRE\ResID" -I "D:\Data\dev\uARMRE\src\app\widget" -I "D:\Data\dev\uARMRE\src\app\launcher" -I "D:\Data\dev\uARMRE\src\app\wallpaper" -I "D:\Data\dev\uARMRE\src\app\screen_lock" -I "D:\Data\dev\uARMRE\include\service" -I "D:\Data\dev\uARMRE\include\component" -I "D:\Data\dev\uARMRE\include\service" -I "D:\Data\dev\uARMRE\src\framework" -I "D:\Data\dev\uARMRE\src\framework\ui_core\base" -I "D:\Data\dev\uARMRE\src\framework\ui_core\mvc" -I "D:\Data\dev\uARMRE\src\framework\ui_core\pme" -I "D:\Data\dev\uARMRE\src\framework\mmi_core" -I "D:\Data\dev\uARMRE\src\ui_engine\vrt\interface" -I "D:\Data\dev\uARMRE\src\component" -I "D:\Data\dev\uARMRE\src\ui_engine\framework\xml" -I "D:\Data\dev\uARMRE"
if %errorlevel% NEQ 0 goto exit
echo     CC    callout_RAM.c
"D:\Data\dev\Sourcery_CodeBench_Lite_for_ARM_EABI\bin\arm-none-eabi-gcc" -static -c -fpic -mcpu=arm7tdmi-s -fvisibility=hidden -mthumb -mlittle-endian -Ofast -D__MRE_COMPILER_GCC__ -fno-exceptions -fno-non-call-exceptions -o "D:\Data\dev\uARMRE\arm\callout_RAM.o" -c "d:\Data\dev\uARMRE\callout_RAM.c"      -D _MINIGUI_LIB_ -D _USE_MINIGUIENTRY -D _NOUNIX_ -D _FOR_WNC -D __MRE_SDK__ -D   __MRE_VENUS_NORMAL__  -D  __MMI_MAINLCD_240X320__ -I "C:\Program Files (x86)\MRE SDK V3.0.00\include" -I "C:\Program Files (x86)\MRE SDK V3.0.00\include\service" -I "C:\Program Files (x86)\MRE SDK V3.0.00\include" -I "C:\Program Files (x86)\MRE SDK V3.0.00\include\service" -I "D:\Data\dev\uARMRE\include" -I "D:\Data\dev\uARMRE\include\service" -I "D:\Data\dev\uARMRE\include\component" -I "D:\Data\dev\uARMRE\ResID" -I "D:\Data\dev\uARMRE\src\app\widget" -I "D:\Data\dev\uARMRE\src\app\launcher" -I "D:\Data\dev\uARMRE\src\app\wallpaper" -I "D:\Data\dev\uARMRE\src\app\screen_lock" -I "D:\Data\dev\uARMRE\include\service" -I "D:\Data\dev\uARMRE\include\component" -I "D:\Data\dev\uARMRE\include\service" -I "D:\Data\dev\uARMRE\src\framework" -I "D:\Data\dev\uARMRE\src\framework\ui_core\base" -I "D:\Data\dev\uARMRE\src\framework\ui_core\mvc" -I "D:\Data\dev\uARMRE\src\framework\ui_core\pme" -I "D:\Data\dev\uARMRE\src\framework\mmi_core" -I "D:\Data\dev\uARMRE\src\ui_engine\vrt\interface" -I "D:\Data\dev\uARMRE\src\component" -I "D:\Data\dev\uARMRE\src\ui_engine\framework\xml" -I "D:\Data\dev\uARMRE"
if %errorlevel% NEQ 0 goto exit
echo     CC    T2Input.cpp
"D:\Data\dev\Sourcery_CodeBench_Lite_for_ARM_EABI\bin\arm-none-eabi-g++" -static -c -fpic -mcpu=arm7tdmi-s -fvisibility=hidden -mthumb -mlittle-endian -Ofast -D__MRE_COMPILER_GCC__ -fno-exceptions -fno-non-call-exceptions -fno-rtti -fcheck-new -fno-rtti -fcheck-new -fno-rtti -fcheck-new -o "D:\Data\dev\uARMRE\arm\T2Input.o" -c "d:\Data\dev\uARMRE\T2Input.cpp"      -D _MINIGUI_LIB_ -D _USE_MINIGUIENTRY -D _NOUNIX_ -D _FOR_WNC -D __MRE_SDK__ -D   __MRE_VENUS_NORMAL__  -D  __MMI_MAINLCD_240X320__ -I "C:\Program Files (x86)\MRE SDK V3.0.00\include" -I "C:\Program Files (x86)\MRE SDK V3.0.00\include\service" -I "C:\Program Files (x86)\MRE SDK V3.0.00\include" -I "C:\Program Files (x86)\MRE SDK V3.0.00\include\service" -I "D:\Data\dev\uARMRE\include" -I "D:\Data\dev\uARMRE\include\service" -I "D:\Data\dev\uARMRE\include\component" -I "D:\Data\dev\uARMRE\ResID" -I "D:\Data\dev\uARMRE\src\app\widget" -I "D:\Data\dev\uARMRE\src\app\launcher" -I "D:\Data\dev\uARMRE\src\app\wallpaper" -I "D:\Data\dev\uARMRE\src\app\screen_lock" -I "D:\Data\dev\uARMRE\include\service" -I "D:\Data\dev\uARMRE\include\component" -I "D:\Data\dev\uARMRE\include\service" -I "D:\Data\dev\uARMRE\src\framework" -I "D:\Data\dev\uARMRE\src\framework\ui_core\base" -I "D:\Data\dev\uARMRE\src\framework\ui_core\mvc" -I "D:\Data\dev\uARMRE\src\framework\ui_core\pme" -I "D:\Data\dev\uARMRE\src\framework\mmi_core" -I "D:\Data\dev\uARMRE\src\ui_engine\vrt\interface" -I "D:\Data\dev\uARMRE\src\component" -I "D:\Data\dev\uARMRE\src\ui_engine\framework\xml" -I "D:\Data\dev\uARMRE"
if %errorlevel% NEQ 0 goto exit
echo     LD    uARMRE.axf
"D:\Data\dev\Sourcery_CodeBench_Lite_for_ARM_EABI\bin\arm-none-eabi-gcc" -o "D:\Data\dev\uARMRE\uARMRE.axf"  "D:\Data\dev\uARMRE\arm\gccmain.o"  "D:\Data\dev\uARMRE\arm\callout_RAM.o"  "D:\Data\dev\uARMRE\arm\Console.o"  "D:\Data\dev\uARMRE\arm\Console_io.o"  "D:\Data\dev\uARMRE\arm\cp15.o"  "D:\Data\dev\uARMRE\arm\CPU.o"  "D:\Data\dev\uARMRE\arm\dcache.o"  "D:\Data\dev\uARMRE\arm\fifo.o"  "D:\Data\dev\uARMRE\arm\icache.o"  "D:\Data\dev\uARMRE\arm\main.o"  "D:\Data\dev\uARMRE\arm\math64.o"  "D:\Data\dev\uARMRE\arm\mem.o"  "D:\Data\dev\uARMRE\arm\MMU.o"  "D:\Data\dev\uARMRE\arm\pxa255_DMA.o"  "D:\Data\dev\uARMRE\arm\pxa255_DSP.o"  "D:\Data\dev\uARMRE\arm\pxa255_GPIO.o"  "D:\Data\dev\uARMRE\arm\pxa255_IC.o"  "D:\Data\dev\uARMRE\arm\pxa255_LCD.o"  "D:\Data\dev\uARMRE\arm\pxa255_PwrClk.o"  "D:\Data\dev\uARMRE\arm\pxa255_RTC.o"  "D:\Data\dev\uARMRE\arm\pxa255_TIMR.o"  "D:\Data\dev\uARMRE\arm\pxa255_UART.o"  "D:\Data\dev\uARMRE\arm\RAM.o"  "D:\Data\dev\uARMRE\arm\rt.o"  "D:\Data\dev\uARMRE\arm\SoC.o"  "D:\Data\dev\uARMRE\arm\T2Input.o" -Ofast -static -fpic -pie -T "C:\Program Files (x86)\MRE SDK V3.0.00\lib\MRE30\armgcc_t\scat.ld" -l:"C:\Program Files (x86)\MRE SDK V3.0.00\lib\MRE30\armgcc_t\percommon.a" -l:"C:\Program Files (x86)\MRE SDK V3.0.00\lib\MRE30\armgcc_t\pertcp.a" -l:"C:\Program Files (x86)\MRE SDK V3.0.00\lib\MRE30\armgcc_t\persensor.a" -l:"C:\Program Files (x86)\MRE SDK V3.0.00\lib\MRE30\armgcc_t\persmsper.a" -l:"C:\Program Files (x86)\MRE SDK V3.0.00\lib\MRE30\armgcc_t\perbitstream.a" -l:"C:\Program Files (x86)\MRE SDK V3.0.00\lib\MRE30\armgcc_t\percontact.a" -l:"C:\Program Files (x86)\MRE SDK V3.0.00\lib\MRE30\armgcc_t\permms.a" -l:"C:\Program Files (x86)\MRE SDK V3.0.00\lib\MRE30\armgcc_t\persmsmng.a" -l:"C:\Program Files (x86)\MRE SDK V3.0.00\lib\MRE30\armgcc_t\perfile.a"
if %errorlevel% NEQ 0 goto exit
echo     PACK  uARMRE.pkd
"C:\Program Files (x86)\MRE SDK V3.0.00\tools\ResEditor\CmdShell.exe" pack -silent -resolution 240x320 -o "D:\Data\dev\uARMRE\uARMRE.pkd" -e AXF "D:\Data\dev\uARMRE\uARMRE.vcproj" "D:\Data\dev\uARMRE\uARMRE.axf"
if %errorlevel% NEQ 0 goto exit
echo     GEN   uARMRE.vxp
"C:\Program Files (x86)\MRE SDK V3.0.00\tools\PackDigist.exe" "D:\Data\dev\uARMRE\uARMRE.vcproj" "uARMRE" "0.1.0" "uARMRE contributors" "3072" "NotSupportBg" "Not Support rotate" "uARMRE" "uARMRE" "uARMRE" "1234567890" "content" " TCP Sensor SMS(person) BitStream Contact MMS SMSMng File" "vxp" "GCC" "PKD" "UnCompress" "NoVPI" "Adaptable" "15728960" "UnSysMemAble" "" "-1" "UNPUSH" "-1" ""  "UnAutoStart"  "UnTransferImg" "NoIdleShortcut"  D:\Data\dev\uARMRE\arm D:\Data\dev\uARMRE\build.log

:exit

(Script cut from my BuildApp.bat for uARMRE)

You will need to modify:

You should:

(If I'm not missing anything, then it's all you need to change)

Building for running in MODIS using VS2022

REMEMBER: MODIS is an x86 (32-bit) application, so don't link the vxp against x64 libs.

FYI, I am making a script to automatically do these things for you, but since I'm not having a lot of time, the project was abandoned, but I'm always welcome PRs

Thank you!