Re: Pascal
Yes, I programmed pascal on CP/M on z80 and late on 8086 Borland pascal, 1987 I hope to try to compile the .pas on our u-blox modules w106 and b302, that are esp32 and nrf52 core Nice job Enviado do meu iPhone > Em 12 de mar. de 2022, à(s) 00:30, Gregory Nutt > escreveu: > > >> >> Will Embedded Pascal open /dev/ files ? >> > > Yes. The Pascal I/O run-time is a portability layer. Ffor Linux and NuttX > it uses standard C library calls. It does use C buffered I/O (fopen, > fread, fwrite, etc.) which may not be ideal for some kinds of device I/O. > An alternative I/O run-time based on non-buffered I/O (open, read, write, > etc.) would probably be better and not difficult to do at all. > > > > That run-time code is here: > https://github.com/patacongo/Pascal/blob/main/insn16/libexec/libexec_sysio.c#L1298 > > > > I haven't considered hard-realtime with an interpreter. t I think this > effort is more in line with a hobbyist's interests. Performance on a > desktop, even under the simulator, is really very good and appears to be on > par with native code; but I assume there could be performance issues when > it runs on a lower performance platform. > > > > Calling it "interpreted" is misleading. The source code is compiled, > optimized, and linked into an ELF-like executable format. So what is > interpreted is machine language for a made up CPU. I have other emulated > machine architectures that are not in the repository currently (too much to > maintain). Translating the code to run natively on ARM or RISC-V is > possible, just not as interesting to me. > > > > The history of Pascal is interesting. Invented by Niklaus Wirth > https://en.wikipedia.org/wiki/Niklaus_Wirth it became widely popular until > destroyed by Brian Kernighan > https://www.cs.virginia.edu/~evans/cs655/readings/bwk-on-pascal.html . > Modern Pascal has resolved all of these issues, but it is no longer a > language in wide use. It was widely used not too long ago with Borland > Turbo Pascal and Delphi. There is a modest following for contemporary > FreePascal/Lazarus. Then there is GNU Pascal, but I haven’t heard any kind > words for GNU Pascal.
Re: Error when building custom board
Hello Petro, After https://github.com/apache/incubator-nuttx/pull/5712, there's a error when building my custom board: make[1]: Entering directory '/home/zouboan/G/NuttX/nuttx/arch/arm/src' make[2]: Entering directory '/home/zouboan/G/NuttX/fft/fft-f405/src' make[2]: *** No rule to make target 'libboard.a'. Stop. make[2]: Leaving directory '/home/zouboan/G/NuttX/fft/fft-f405/src' Makefile:139: recipe for target 'board/libboard.a' failed make[1]: *** [board/libboard.a] Error 2 make[1]: Leaving directory '/home/zouboan/G/NuttX/nuttx/arch/arm/src' tools/Unix.mk:509: recipe for target 'nuttx' failed My custom board's configs is like this: CONFIG_ARCH="arm" CONFIG_ARCH_BOARD_CUSTOM=y CONFIG_ARCH_BOARD_CUSTOM_DIR="../fft/fft-f405" CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="fft-f405" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F405RG=y How should I modify the configuration to adapt to pull #5712 ? Best regards, Zou -- Original -- From: "petro.karashchenko"https://github.com/apache/incubator-nuttx/pull/5715 I do not like it a bit because this leads to a situation that leads to a need to make a distclean each time the ARCH_BOARD_COMMON is changed. Best regards, Petro Best regards, Petro пт, 11 бер. 2022 р. о 11:33 Petro Karashchenko https://github.com/apache/incubator-nuttx/pull/5712 while > having https://github.com/apache/incubator-nuttx/pull/5274 still > reverted. > > I will give feedback as soon as I will replicate your issue at my end. > > Best regards, > Petro > > пт, 11 бер. 2022 р. о 08:12 Jukka Laitinen https://github.com/apache/incubator-nuttx/pull/5712 and feedback if it > > > works for you. > > > > > > Best regards, > > > Petro > > > > > > чт, 10 бер. 2022 р. о 07:24 Jukka Laitinen https://github.com/apache/incubator-nuttx/pull/5705 to recover things > > >>> and added a separate option that should be explicitly enabled to > > >>> re-use a board-level common code by custom boards users. > > >>> > > >>> Please try this change and feedback if that solves the problem. > > >>> > > >>> Best regards, > > >>> Petro > > >>> > > >>> чт, 3 бер. 2022 р. о 15:33 Jukka Laitinen https://github.com/tiiuae/px4-firmware/ (nuttx is included as a submodule) > > > > > > Building "make ssrc_icicle_default". The board files are in > > > boards/ssrc/icicle/nuttx-config and NuttX cloned in > > > platforms/nuttx/Nuttx/nuttx. > > > > > > I didn't yet start looking into it in detail, what goes wrong, just > > > bisected the nuttx and reverted the commit which broke it for me. I need > > > to look back later to see how to change the off-tree board config to get > > > it back online. > > > > > > Just noticed that the error is somewhat similar, although coming from > > > different build env. But in my case it is likely that I need to adapt > > > the cmake build scripts according to the changes in nuttx. > > > > > > -Jukka > > > > > > > > > > > > On 3.3.2022 9.37, Petro Karashchenko wrote: > > >> Hello Jukka, > > >> > > >> So you experience the same problem as Daniel and reverting the commit helps? > > >> > > >> Before f77956a227f1db6ecb44eda3814e7b02aa2187a6 there was no way to > > >> reuse common code from "nuttx/board/...". I'm using a custom board > > >> based on SAME70 and after > > >> https://github.com/apache/incubator-nuttx/pull/4981 I found my code > > >> tree broken. Now the folder structure for "boards/arm/samv7" is the > > >> same as in "boards/arm/stm32". Here is what I did to get it back > > >> running: > > >> 1. Synced "custom-board/scripts/Make.defs" with > > >> "boards/arm/samv7/same70-xplained/scripts/Make.defs" > > >> 2. Renamed "custom-board/src/Makefile" to "custom-board/src/Make.defs" > > >> and synced with "boards/arm/samv7/same70-xplained/src/Make.defs" > > >> 3. Removed files in my code tree that have exactly the same > > >> implementation as files from "boards/arm/samv7/common" > > >> > > >> It seems like Daniel is hitting the same issue, so I expect that > > >> renaming Makefile to Make.defs plus setting "BOARD_STM32_COMMON=n" > > >> should fix the issue without any additional file clean-up. > > >> Please give me feedback if that helps. > > >> > > >> Best regards, > > >> Petro > > >> > > >> чт, 3 бер. 2022 р. о 07:40 Jukka Laitinen
Re: Error when building custom board
Hello Zou, The https://github.com/apache/incubator-nuttx/pull/5712 unifies board common logic usage under a single option ARCH_BOARD_COMMON that is introduced instead of per-arch options like BOARD_SAMV7_COMMON or BOARD_STM32_COMMON. So most probably if your board defconfig had BOARD_STM32_COMMON config enabled you need to replace it with ARCH_BOARD_COMMON option. Also while working on https://github.com/apache/incubator-nuttx/pull/5712 I found out that some boards that didn't have BOARD_STM32_COMMON enabled actually used board common code. So the way to fix your build is to remove CONFIG_BOARD_STM32_COMMON=y from defconfig if it was present and add CONFIG_ARCH_BOARD_COMMON=y to your board defconfig. Please give me feedback if that works for you. I will add a description on how to migrate to a new NuttX release, so users will be informed about this breaking change. Best regards, Petro сб, 12 бер. 2022 р. о 16:10 fft пише: > > Hello Petro, > > > > After https://github.com/apache/incubator-nuttx/pull/5712, there's a error > when building my custom board: > > > make[1]: Entering directory '/home/zouboan/G/NuttX/nuttx/arch/arm/src' > make[2]: Entering directory '/home/zouboan/G/NuttX/fft/fft-f405/src' > make[2]: *** No rule to make target 'libboard.a'. Stop. > make[2]: Leaving directory '/home/zouboan/G/NuttX/fft/fft-f405/src' > Makefile:139: recipe for target 'board/libboard.a' failed > make[1]: *** [board/libboard.a] Error 2 > make[1]: Leaving directory '/home/zouboan/G/NuttX/nuttx/arch/arm/src' > tools/Unix.mk:509: recipe for target 'nuttx' failed > > > > My custom board's configs is like this: > > > CONFIG_ARCH="arm" > CONFIG_ARCH_BOARD_CUSTOM=y > CONFIG_ARCH_BOARD_CUSTOM_DIR="../fft/fft-f405" > CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y > CONFIG_ARCH_BOARD_CUSTOM_NAME="fft-f405" > CONFIG_ARCH_CHIP="stm32" > CONFIG_ARCH_CHIP_STM32=y > CONFIG_ARCH_CHIP_STM32F405RG=y > > > How should I modify the configuration to adapt to pull #5712 ? > > > > Best regards, > Zou > > > -- Original -- > From: "petro.karashchenko" Date: Fri, Mar 11, 2022 10:41 PM > To: "dev" > Subject: Re: Error when building custom board > > > > Hello Jukka, > > Finally I was able to reproduce the situation that you are talking > about. The case is that in PX4 environment the path to the board files > is hardcoded to $(BOARD_DIR)/src unconditionally, but actually it > depends on BOARD_COMMON_DIR value: > ifneq ($(BOARD_COMMON_DIR),) > ARCH_SRC_BOARD_SYMLINK=$(BOARD_COMMON_DIR) > ARCH_SRC_BOARD_BOARD_SYMLINK=$(BOARD_DIR)/src > else > ARCH_SRC_BOARD_SYMLINK=$(BOARD_DIR)/src > endif > > So the best solution that I can introduce without modification of PX4 > build system is https://github.com/apache/incubator-nuttx/pull/5715 > > I do not like it a bit because this leads to a situation that leads to > a need to make a distclean each time the ARCH_BOARD_COMMON is changed. > > Best regards, > Petro > > Best regards, > Petro > > пт, 11 бер. 2022 р. о 11:33 Petro Karashchenko > > > > Hello Jukka, > > > > I'm still in the middle of building a docker image for your project. > > Currently with slow internet it takes a while. > > > > But what I see from the error that you report is that probably you > > applied https://github.com/apache/incubator-nuttx/pull/5712 while > > having https://github.com/apache/incubator-nuttx/pull/5274 still > > reverted. > > > > I will give feedback as soon as I will replicate your issue at my end. > > > > Best regards, > > Petro > > > > пт, 11 бер. 2022 р. о 08:12 Jukka Laitinen пише: > > > > > > Hi, > > > > > > With this patch, all my targets fail with: > > > > > > Makefile:23: board/Make.defs: No such file or directory > > > make[3]: *** No rule to make target 'board/Make.defs'. Stop. > > > > > > Should I add some new CONFIGs? Sorry but I don't have much time > today to > > > debug this further > > > > > > -Jukka > > > > > > > > > On 10.3.2022 21.00, Petro Karashchenko wrote: > > > > Hello Jukka, > > > > > > > > I would like to ask you to try an alternative PR > > > > https://github.com/apache/incubator-nuttx/pull/5712 and > feedback if it > > > > works for you. > > > > > > > > Best regards, > > > > Petro > > > > > > > > чт, 10 бер. 2022 р. о 07:24 Jukka Laitinen > > > >> Hi, > > > >> > > > >> This fixes the build for me, I just leave the > > > >> CONFIG_BOARD_CUSTOM_ARCH_BOARD_COMMON undefined. > > > >> > > > >> Thanks, > > > >> > > > >> Jukka > > > >> > > > >> On 9.3.2022 19.22, Petro Karashchenko wrote: > > > >>> Hello Jukka, > > > >>> > > > >>> I was able to localize the root cause of the issue. > I've created > > > >>> https://github.com/apache/incubator-nuttx/pull/5705 to > recover things > > > >>> and added a separate option that should be explicitly > enabled to > > > >>> re-use a board-level common code by custom boards > users. > > > >>> > > > >>> Please try this change and feedback if that solves the > problem. > > > >>> > > > >>> Best regards, > > > >>> Petro >
Re: Error when building custom board
Hello Petro, Thanks for your help, i didn't use board common code,and my custom board defconfig had not enable BOARD_STM32_COMMON config ,but when i tried add CONFIG_ARCH_BOARD_COMMON=y to my custom board defconfig according to your suggestion, the compile did succeed. Besides, I found that if the CONFIG_ARCH_BOARD_COMMON=y was not add to my custom board defconfig, there's no symbolic link of my custom board in ./nuttx/boards/arm/stm32/common, I think it's this that led to the compile error, but i don't known why. my custom board Make.defs begin with include $(TOPDIR)/Make.defs and end with DEPPATH += --dep-path board VPATH += :board CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board) Is it correct or not? Best regards, Zou -- Original -- From: "petro.karashchenko"https://github.com/apache/incubator-nuttx/pull/5712 unifies board common logic usage under a single option ARCH_BOARD_COMMON that is introduced instead of per-arch options like BOARD_SAMV7_COMMON or BOARD_STM32_COMMON. So most probably if your board defconfig had BOARD_STM32_COMMON config enabled you need to replace it with ARCH_BOARD_COMMON option. Also while working on https://github.com/apache/incubator-nuttx/pull/5712 I found out that some boards that didn't have BOARD_STM32_COMMON enabled actually used board common code. So the way to fix your build is to remove CONFIG_BOARD_STM32_COMMON=y from defconfig if it was present and add CONFIG_ARCH_BOARD_COMMON=y to your board defconfig. Please give me feedback if that works for you. I will add a description on how to migrate to a new NuttX release, so users will be informed about this breaking change. Best regards, Petro сб, 12 бер. 2022 р. о 16:10 fft https://github.com/apache/incubator-nuttx/pull/5712, there's a error when building my custom board: > > > make[1]: Entering directory '/home/zouboan/G/NuttX/nuttx/arch/arm/src' > make[2]: Entering directory '/home/zouboan/G/NuttX/fft/fft-f405/src' > make[2]: *** No rule to make target 'libboard.a'. Stop. > make[2]: Leaving directory '/home/zouboan/G/NuttX/fft/fft-f405/src' > Makefile:139: recipe for target 'board/libboard.a' failed > make[1]: *** [board/libboard.a] Error 2 > make[1]: Leaving directory '/home/zouboan/G/NuttX/nuttx/arch/arm/src' > tools/Unix.mk:509: recipe for target 'nuttx' failed > > > > My custom board's configs is like this: > > > CONFIG_ARCH="arm" > CONFIG_ARCH_BOARD_CUSTOM=y > CONFIG_ARCH_BOARD_CUSTOM_DIR="../fft/fft-f405" > CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y > CONFIG_ARCH_BOARD_CUSTOM_NAME="fft-f405" > CONFIG_ARCH_CHIP="stm32" > CONFIG_ARCH_CHIP_STM32=y > CONFIG_ARCH_CHIP_STM32F405RG=y > > > How should I modify the configuration to adapt to pull #5712 ? > > > > Best regards, > Zou > > > -- Original -- > From: "petro.karashchenko"https://github.com/apache/incubator-nuttx/pull/5715 > > I do not like it a bit because this leads to a situation that leads to > a need to make a distclean each time the ARCH_BOARD_COMMON is changed. > > Best regards, > Petro > > Best regards, > Petro > > пт, 11 бер. 2022 р. о 11:33 Petro Karashchenko > https://github.com/apache/incubator-nuttx/pull/5712 while > > having https://github.com/apache/incubator-nuttx/pull/5274 still > > reverted. > > > > I will give feedback as soon as I will replicate your issue at my end. > > > > Best regards, > > Petro > > > > пт, 11 бер. 2022 р. о 08:12 Jukka Laitinen https://github.com/apache/incubator-nuttx/pull/5712 and feedback if it > > > > works for you. > > > > > > > > Best regards, > > > > Petro > > > > > > > > чт, 10 бер. 2022 р. о 07:24 Jukka Laitinen https://github.com/apache/incubator-nuttx/pull/5705 to recover things > > > >>> and added a separate option that should be explicitly enabled to > > > >>> re-use a board-level common code by custom boards users. > > > >>> > > > >>> Please try this change and feedback if that solves the problem. > > > >>> > > > >>> Best regards, > > > >>> Petro > > > >>> > > > >>> чт, 3 бер. 2022 р. о 15:33 Jukka Laitinen https://github.com/tiiuae/px4-firmware/ (nuttx is included as a submodule) > > > >>>>>>>>> > > > >>>>>>>>> Building "make ssrc_icicle_default". The board files are in > > > >>>>>>>>> boards/ssrc/icicle/nuttx-config and NuttX cloned in > > > >>>>>>>>> platforms/nuttx/Nuttx/nuttx. > > > >>>>>>>>> > > > >>>>>>>>> I didn't yet start looking into it in detail, what goes wrong, just > > > >>>>>>>