names
stringlengths 1
98
| readmes
stringlengths 8
608k
| topics
stringlengths 0
442
| labels
stringclasses 6
values |
---|---|---|---|
RTuinOS | rtuinos an event based rtos for the popular arduino platform rtuinos is a small scale real time operating system for arduino the main documentation rtuinos 1 0 userguide pdf manual is found as doc manual rtuinos 1 0 userguide pdf in the downloadable archive rtuinos 1 0 2 zip complete setup the hints given here are just a brief summary of what s stated there this distribution has been compiled for arduino 1 0 5 under windows linux or mac os only the mega 2560 board is supported just like that in the user guide in the source code and by compiler error directives you ll get hints how to modify the code for other arduino boards the arduino environment can be got at www arduino cc it needs to be installed and operational before using rtuinos ensure that the original arduino ide and the sample sketches work well to install rtuinos extract the files in the archive to a directory of your choice the target location must grant read access to all files and write access to all directories and the path to the target location must not contain any blanks the link between the rtuinos build environment gnu make based and the arduino installation is made by means of a new environment variable you need to create the variable arduino home prior to opening any shell window arduino home holds the path to the arduino installation like c programfiles arduino 1 0 5 under windows caution no blanks in paths are permitted and this holds true also for the arduino installation files an arduino installation at e g c program files would make the makefile fail to compile the sources the gnu make tool which is shipped with arduino needs to be on the operating system s search path extending the search path accordingly is not part of the arduino standard installation procedure you will probably still have to do this type make version to find out gnu make 3 81 should start up be aware revision 3 80 or elder of make is not sufficient developing an rtuinos application means to work with a makefile controlled build environment eclipse emacs or any kind of command shell can be used to run the build process it s not necessary to use the original arduino ide it s however still a good choice for a terminal program for the communication with the running rtuinos application what s new in release 1 0 the makefile has been revised different operating systems windows linux and mac os are now supported path conventions are now obeyed usage of forward slashes and a trailing slash in path names tools are addressed by absolute paths to avoid conflicts with improperly set path variable the build of different test cases has been decoupled now each one has its own build folder a clean is no longer necessary when switching the application the creation of required working directories has been integrated into the build directory creation is no longer a build rule which has to be called explicitly the makefile has been split in parts the configuration part is now separated clearly recognizable as such and understandable the invariant parts of the makefile have been hidden in a sub directory a kind of callback is made into the application folder an optional makefile fragment located in the application folder will be included into the build and permits to override general settings in an application related fashion support of arduino 1 0 5 the current release as of today 31 7 2013 all test cases can be built and run with arduino 1 0 5 support of mutexes and semaphores the existing concept of events has been extended an event can now be of kind ordinary broadcasted event as before mutex or semaphore task resume conditions can continue to combine any events regardless of the kind an extension of rtuinos api was not necessary to introduce mutexes and semaphores the api function rtos setevent has been renamed to the more adequate rtos sendevent the old name is deprecated but still operational as a macro maps it onto the new name more assertions have been placed in the kernel for debug compilation which anticipate and notify many typical application errors like an idle task which tries to suspend a new test case see tc14 proves the compatibility of the arduino liquidcrystal library with rtuinos the cpu load estimation is unchanged but has been moved from a test case folder to the common folder rtos and is now available to any application just like that the doxygen documentation now includes those test cases which contain instructive sample code of general interest | os |
|
myProfile | myprofile assignment1 information technology | server |
|
pb-design-system | pb design system 7 this is a release of the design system with bootstrap 5 it requires bootstrap 5 angular 15 and ng bootstrap 14 to be installed please see changelog md for breaking changes migrating from 6 x your npm version must be 6 14 17 please check by running npm v your node version must be 14 20 0 please check by running node v installation install this package with npm shell npm install pb design system save also you will need to install boostrap 5 x and angular material shell npm install bootstrap angular material popperjs core save you will see warnings about peer dependencies such as d3 those only need to be installed if you need them configuring angular json add your app s styles scss after the design system css file in the styles array as follows json styles node modules angular material prebuilt themes indigo pink css node modules bootstrap dist css bootstrap min css node modules pb design system dist css designsystem css styles scss optional installs to use bootstrap s javascript components header dropdowns tooltips and or popovers you will also need to load its js files in the scripts array json scripts node modules jquery dist jquery slim js node modules bootstrap dist js bootstrap bundle min js node modules bootstrap dist js bootstrap js | os |
|
CM-Webinar-MD | h1 align center a href https material io img src https github com raquel f cm webinar blob master docs logo svg alt logo width 125 height 125 a h1 div align center h1 webinar material design 2021 h1 h4 universidade de coimbra fctuc departamento de engenharia inform tica h4 br h5 autores h5 a href https github com raquel f raquel ferreira a nbsp nbsp a href https github com rfigas ricardo figueiredo a div br br br h1 finished webinar app h1 this android app is the result of the application of material design components to an ordinary and plain android app created in android studio original template and webinar instructions can be found a href https github com raquel f cm webinar here a | material-design android android-app android-studio java | os |
school-management-backend | school management backend backend system overview backend system overview docs images slide1 jpg rest api api docs docs api yaml backend default port 4000 base address http host name 4000 route categories login login related routes class class management related routes homework homework related routes df definition related routes m master routes rel relationship related routes login routes login routes docs images tsd 20presentation page 2 jpg admin routes login routes docs images tsd 20presentation page 3 jpg parent routes login routes docs images tsd 20presentation page 4 jpg teacher routes login routes docs images tsd 20presentation page 5 20 1 jpg class routes login routes docs images tsd 20presentation page 6 jpg homework routes login routes docs images tsd 20presentation page 7 jpg all other routes login routes docs images tsd 20presentation page 8 jpg the following is the list of routes following the above architecture similar routes docs images listofsimilarroutes png chat module architecture login routes docs images tsd 20presentation page 9 20 1 jpg project report introduction project background the education sector is a fast growing industry in sri lanka due to the rapid development of the private school system there is huge competition among schools and parents department of census statistics 2019 alt text docs images image1 png image tooltip schools are expected to provide many sporting activities and subjects to their students due to the higher workload schools and teachers forget to deliver the required information within a limited period there is a direct impact on children s education due to this delay most of the children like to play or do anything other than homework if parents or teachers didn t give any homework many children would not do any work related to education alt text docs images image2 png image tooltip less work will lead them to lower performances if parents identify the reasons they can find solutions parent teacher meetings home work past papers and term tests can be used to identify and correct the weakness of students fast and efficient communication and resource sharing between teachers and parents can be used to identify and correct the weaknesses of the children school attendance is also very important to generate higher performances attendanceworks org 2018 the team was named as hexatech as a motivation factor all team members are possed with keen to learn and overcome challenges members of the team are table tr td ol li thissa gunarathne li ol td td rowspan 6 as td td p style text align right project manager p td tr tr td ol li amila dissanayaka li ol td td p style text align right server administrator p td tr tr td ol li preshan visad silva li ol td td p style text align right business analyst p td tr tr td ol li niruhan viswarupan li ol td td p style text align right system developer p td tr tr td ol li mohan prakashini li ol td td p style text align right qa executive p td tr tr td ol li lankitha gallage li ol td td p style text align right system developer p td tr table aims and objectives alt text docs images image3 png image tooltip as a team we expect to reduce the communication gap between teachers and parents shilpa ys am is a progressive web application developed using mern stack which is to create a user friendly personalized environment for schools to maintain their communication between teachers parents and students alt text docs images image4 png image tooltip we aim to develop the efficiency of teachers and school management for better results development objectives can be categorized into five areas app messaging table tr td rowspan 5 strong em message to em strong td td ol li em all the members em li ol td tr tr td ol li em an entire grade em li ol td tr tr td ol li em an entire class em li ol td tr tr td ol li em a particular parent em li ol td tr tr td ol li em a teacher from a parent em li ol td tr table notifications table tr td rowspan 5 strong em send notifications to em strong td td ol li em student unauthorized absence em li ol td tr tr td ol li em fees reminders em li ol td tr tr td ol li em parent teacher meetings em li ol td tr tr td ol li em homework em li ol td tr tr td ol li em annual student profile update by parents em li ol td tr table time tables table tr td rowspan 3 strong em record em strong td td ol li em class time table em li ol td tr tr td ol li em exam time table em li ol td tr tr td ol li em extra activities em li ol td tr table downloads table tr td rowspan 3 strong em links to download em strong td td ol li em exam report card em li ol td tr tr td ol li em exam past papers em li ol td tr tr td ol li em academic reports em li ol td tr table file update table tr td rowspan 5 strong em master transaction em strong td td ol li em student profile em li ol td tr tr td ol li em teachers profile em li ol td tr tr td ol li em school calendar em li ol td tr tr td ol li em contact information em li ol td tr tr td ol li em attendance em li ol td tr table project planning table tr td img src docs images image5 png width alt alt text title image tooltip td td em here shows the gantt chart used in the life cycle of software development of the project em ul li there are five milestones to check the progress with the time using milestones project deviation can be identified ul li parallel activities are visible in the same colours then identification of such tasks is easier than other tasks li ul li ul td tr table ask allocation task allocation is done according to the selected role of the members there are three members allocated for programming and development related tasks other three members are assigned for quality assurance business analysis and project management task allocation sheet is an effective way to identify members assigned for each task table tr td colspan 4 strong em project name em strong p strong em shilpa parents teacher communication application em strong td td colspan 3 strong em project start date em strong p strong em 15 01 2020 em strong td tr tr td em brainstorming em td td 15 12 2019 td td high td td 15 12 2019 td td done td td every team member td td discussion about the project topics td tr tr td em requirement gathering em td td 30 1 2020 td td normal td td 28 01 2020 td td done td td preshan td td completed successfully td tr tr td em business feasibility analysis em td td 4 2 2020 td td normal td td 3 2 2020 td td done td td preshan amila thissa td td completed successfully td tr tr td em technical feasibility analysis em td td 10 2 2020 td td normal td td 10 2 2020 td td done td td lankitha niruhan amila td td completed successfully td tr tr td em software design phase 1 em td td 15 02 2020 td td high td td 15 02 2020 td td done td td lankitha preshan amila td td completed successfully td tr tr td em software design phase 2 em td td 18 02 2020 td td high td td 18 02 2020 td td done td td preshan niruhan lankitha td td completed successfully td tr tr td em user interface design em td td 14 02 2020 td td normal td td 27 03 2020 td td pending td td lankitha td td pending due to the workload of the programmer td tr tr td em quality assurance of the design em td td 20 02 2020 td td normal td td 27 03 2020 td td pending td td prakashini td td partially completed td tr tr td em back end programming em td td 8 3 2020 td td high td td 10 3 2020 td td done td td niruhan td td most of the development process done td tr tr td em front end programming em td td 15 03 2020 td td high td td 27 03 2020 td td pending td td lankitha td td pending due to the workload of the programmer td tr tr td em integration of the modules em td td 17 03 2020 td td high td td 27 03 2020 td td pending td td lankitha amila niruhan td td pending due to defendant work td tr tr td em testing em td td 18 03 2020 td td normal td td 27 03 2020 td td pending td td prakashini preshan thissa td td pending due to defendant work td tr tr td em quality assurance of the software em td td 20 03 2020 td td normal td td 27 03 2020 td td pending td td prakashini td td pending due to defendant work td tr tr td em finalize the development process em td td 20 03 2020 td td normal td td 27 03 2020 td td pending td td lankitha niruhan preshan td td pending due to defendant work td tr table risk management risk management is an important part of the successful completion of the project software risk management requires a greater depth of knowledge than other risk management processes identified risks table tr td strong em id em strong td td strong em identified risk em strong td td strong em risk management method em strong td tr tr td strong em r sub 1 sub em strong td td em not being able to complete the project on time em td td assign half of the team members for development related tasks frequently ask programmers to present their work td tr tr td strong em r sub 2 sub em strong td td em less user satisfaction em td td instructions were given to the developers and business analysis to tally the gathered requirements and development output td tr tr td strong em r sub 3 sub em strong td td em cost overrun em td td encourage members to develop most of the modules within the team td tr tr td strong em r sub 4 sub em strong td td em complete failure of the project em td td due to coronavirus infections there is a possibility that the project fails advice has given to the members to maintain their health td tr tr td strong em r sub 5 sub em strong td td em software quality problems em td td rigorous quality assurance testing and validation td tr tr td strong em r sub 6 sub em strong td td em knowledge gaps of the members em td td self learning the identified gaps online and knowledge sharing among group members td tr tr td strong em r sub 7 sub em strong td td em less commitment of the team members em td td always motivate team member to finish the work as soon as possible td tr table system analysis system analysis is used to identify requirements and convert them into a software reality first required information should be collected by analysing gathered requirements the framework of the software can be designed fact gathering techniques we used the following techniques to gather the required information 1 interviews top down approach used frequently 2 observation school work process observed 3 document analysis analysis student reports school letters and documents published on the notice board analysis of gathered facts according to the gathered facts most of the schools expect unique applications rather than a common application they need to overcome the weakness of the whatsapp app their budget is also limited schools expect to reduce the workload of the teachers up to some extent they mainly expect attendance absence tracking homework distribution attendance to extracurricular activities payment reminders and individual directed communication using the mobile application better security of the application and over the phone production support also among the expectations of the school management software requirement specification introduction the purpose of this document is to improve communication systems in school document convention database distributed database and the entity relationships feasibility study economic feasibility 1 shilpa reduced a lot of manual work in school 2 using shilpa app school s work efficiency will be improved 3 student s sensitive information eg medical updates can be updated safely and no unauthorized access therefore shilps app is economically feasible technical feasibility 1 mongodb is used as a database which is easy to install and setup and easy to scale 2 the app is developed under the reactjs environment where it provides real and significant mobile applications and it supports both android and ios mobile devices it will save developers time because developers do not need to develop two applications for android and ios therefore shilpa app can be developed in a reasonable time operational feasibility the shilpa app develops to enhance communication and relationship between schools and families since the app can run on both android and ios mobile devices anyone can log in to the app at any time anywhere school computer laptops or tablets can be used for backend purposes since the server is hosted on the cloud no need to keep the server administrator to look after the server and take backups therefore shilpa app is operationally easy to handle intended audience suggestions the system is restricted within the school premises with admin students parents and teachers this was implemented under the requirements gathered from table tr td strong em interview with em strong td td strong em position em strong td td strong em school em strong td tr tr td rev fr indunil sampath td td rector primary principle td td st sebastian s college mortuwa td tr tr td mrs aruni fernando td td class teacher td td st sebastian s college mortuwa td tr tr td mrs shalika perera td td parent td td st sebastian s college mortuwa td tr tr td mas nimira cooray td td student td td st sebastian s college mortuwa td tr tr td mrs sharmila fernando td td sectional head td td holy family convent bambalapitiya td tr tr td mrs rozan td td english teacher td td holy family convent bambalapitiya td tr table project scope 1 access to students parents teachers and admins to use the new application 2 direct messaging between teachers and parents 3 storing student details in the database 4 attendance tracking 5 fee status tracking and reminders 6 parent teacher meeting scheduling 7 homework distribution out of scope 1 online fee payment through gateway 2 timetable for subjects extracurricular activities 3 advanced level stream recommendation 4 school transport gps tracking 5 school calendar view other equivalent systems we refer to a few other systems to identify the process we aim to identify the process to build our system with the higher compatible ability to the market here are a few systems with their functions parentsquare alt text docs images image6 png image tooltip features table tr td ol li sending individual messages li ol td tr tr td ol li sending group messages li ol td tr tr td ol li newsletters li ol td tr tr td ol li sending emergency alerts notification li ol td tr tr td ol li students attendance management li ol td tr tr td ol li school directory li ol td tr tr td ol li payments update li ol td tr tr td ol li school calendar li ol td tr table 10 tass web alt text docs images image7 png image tooltip features table tr td ol li student profile attendance assignment li ol td tr tr td ol li update medical information of the student li ol td tr tr td ol li behavioural management li ol td tr tr td ol li the internet payment gateway for pay fees li ol td tr tr td ol li test time tables li ol td tr tr td ol li test results li ol td tr tr td ol li assessment results li ol td tr tr td ol li view teachers comments li ol td tr table 2 product description 14 product perspective there are three major users of the system table tr td strong em student em strong p basic student information p class details p attendance p marks p extracurricular activities td td strong em parent em strong p basic parent information p occupation details td td strong em teacher em strong p basic teacher information p education qualifications p teaching subjects p extracurricular td tr table alt text docs images image8 png image tooltip apart from the users mentioned above there are administrative users who have all the rights to maintain the system 15 user class and characteristics alt text docs images image9 png image tooltip 11 functions features are shown below functions 1 hostel administration future development 2 learning administration 3 education dashboard 4 class marks and registration update 5 disciplinary management etc future development features 1 centralized app for schools 2 maintain system users 3 sending messages popup notifications to parents 4 finalizing the exam marks average ranks 5 informing the parent s meetings calendar reminders 6 downloads alt text docs images image10 png image tooltip 16 tools environment table tr td img src docs images image11 png width alt alt text title image tooltip td td img src docs images image12 png width alt alt text title image tooltip td td img src docs images image13 jpg width alt alt text title image tooltip td td img src docs images image14 jpg width alt alt text title image tooltip td tr tr td img src docs images image15 png width alt alt text title image tooltip td td img src docs images image16 png width alt alt text title image tooltip td td img src docs images image17 png width alt alt text title image tooltip td td td tr table the operating environment for this school application is used are 1 hosting server centos 7 8 2 firewall iptables 3 frontend platform reactjs 4 backend platform nodejs express 5 database mongodb 6 push notifications firebase 17 database distribution drawing https docs google com drawings d 12345 export png 18 client server system 1 distributed with client server side 2 all data resides on the server side 3 the application executed on the client side 19 hardware the system can be used with the following hardware 1 tablet 2 desktop 3 mobile phone 20 software quality attributes 1 availability including all detailed information competition venue time transport facility 2 correctness passing an accurate information 3 maintainability admin will manage the database and the app 4 usability satisfy the school team and parents 3 system design 21 3 tier architecture three tier architecture is used to compose the layers of logical computing as per to our application we used as a specific type of server side and client side this supported many benefits for the development environment and modularizing the user s interface data storage of a school as well it was very useful to update a specific new feature to an application independently of other parts with flexible improvement in the overall development process this is used because it can help the application to redevelop and modernize without affecting other functional business data access it contains a presentation layer and data tier and well supportive architecture to speed up the development of an application and to check it s performances and to modularize it was used for end application from the database and selected according to school needs specific parts of the application without affecting other features these were developed as layers it showed in below image alt text docs images image18 png image tooltip 22 agile methodology this methodology is used to develop school application and it is used to determine the enhancement needed on the development methods and terms with five those are as follows requirement analysis the stage where the needed requirements are gathered in some schools and describe the problems and motivation for building the school application planning targeting the end users and deciding the time duration and frequent versions hence feedback is received regularly debugging the errors and fixing the problems on time designing an approach using xp and coding style with simple designs to log and view by delivering the domain knowledge to users tasks are allocated according to the respective developers and keeping the task in the form of a board of to do and in progress testing mapping for the process and testing is created in every iteration and it has been started and an artefact is constructed after the iteration levels the whole system is tested and results demonstrated immediately xp uses tdd techniques to ensure all implemented features are tested release in this phase we review the results then assess the current performance of the application identifying whether the system is completed without any errors and failures checked whether it is supported to the end users when release is planned for retirement maintenance once the feedback is received from schools at each stage the results are discussed with the team and the features are further improved and the factors are decided according to their perspective this model is used to get high quality applications and it is a more adaptable alternative with a unique modification due to the above features and advantages we decided to use an agile methodology to develop our application 4 system development 23 development of the prototype two different prototypes were made the first was made for the interim presentation based on the feedback from the lecturer we decided to develop a new prototype from scratch in the prototype both the frontend and backend was developed within the same project and 3 tire architecture was not fully used the frontend was developed using reactjs and the backend using node js express the frontend was basic and not responsive it behaved more like a static web page rather than a responsive react application based on suggested data model changes and feature changes we moved onto the next version which is described in the next section 24 used technologies algorithm as discussed earlier a 3 tire architecture was applied in development model and controller resided in the backend and the view was made in the front end the backend was built in node js with express server socket io was used for developing messaging systems the model was designed as mongoose schemas which can be stored in mongodb the backend and frontend communicate using rest api with http requests the frontend was developed in reactjs and use axios to connect with the backend the ui was developed with material ui bootstrap alt text docs images image19 png image tooltip once a user is logged in a key is sent to the frontend this will be used for all the transactions and along with the username password the system is sending the service key using for the push notifications to the server to map the users for the notifications this is used with the firebase for the notifications alt text docs images image20 png image tooltip sample of a sent token is shown below alt text docs images image21 png image tooltip users of the system are derived as administrators teachers parents students each of them has different credentials of the system administrators have all the authentication alt text docs images image22 png image tooltip administrators can maintain the core details of the organization the option for the privileges is limited alt text docs images image23 png image tooltip once a notification needs to be sent to a specific group an administrator or an authorized teacher and push the notifications to the firebase server and the users will get them instantly a sample notification is shown below alt text docs images image24 png image tooltip system users can also use the internal messaging service to send and receive messages when a user logged in and chat using socket io a port is reserving for s particular message thread system users can be assigned to theses threads by the administrator alt text docs images image25 png image tooltip github was used for version controlling and collaborating among team members 5 system qa testing report testing is combined as manual testing and automated testing for the front end according to our school application i used manual testing for the front end by creating the test cases in excel sheets which allows us to cover all functional nonfunctional scenarios in our system back end was tested using mongodb node js and postman while testing the back end the first time it was successful and again when testing other parts overall back end testing got stuck i restarted and tried to get results but errors continuously occurred therefore that unable to give the results because of time constraints for front end presentation i used the excel sheet to update the process of application whether the application passes or fails with actual and expected results test cases are created along with the development as per our team development we followed the agile methodology in which it can repeat the process in the development stage and from time to time new features are implemented to test the function i used some process procedures which the specific function got pass without any failure while testing front end errors and bugs are identified and reported to our developer then all bugs errors are corrected by developers once bugs are fixed again execute the failing test case to verify whether the specific function is passed alt text docs images image26 png image tooltip qa testing methods process procedures as a qa the testing more importantly concerned to give a good quality of product to the specific school therefore that to cover all functional requirements without any failure in the application i followed some testing process and procedures those are as below 1 qa testing methods analyzed alt text docs images image27 png image tooltip 2 test design manual testing with excel test cases 3 testing methodology agile testing strategy the below shows the procedures and process how application tested as per to agile testing strategy alt text docs images image28 png image tooltip 4 retest error test strategy tracking the error in ui if errors are tracked and identified in application reporting to developer to fix the bugs and give back to retest the specific functions to check get pass alt text docs images image29 png image tooltip | school-management backend-server node-js | server |
blockchain | p align center img src https github com democracyearth vote raw master images democracy earth png width 400 title democracy earth foundation p peer vote a delegated proof of stake block chain for votes that is resistant to coercion by preventing monopoly formation using quadratic voting under a liquid democracy our goal is to create the smallest possible chain able to store the largest quantity of social political interactions the aim is to develop it in the least amount of lines under the most widespread development language inspired by the naivechain https medium com lhartikk a blockchain in 200 lines of code 963cc1cc0e54 project developed by lucas hartikk http github com lhartikk this project is meant strictly for research purposes and is not meant to be put in live production as it is right now in a similar fashion to what minix was for linux it is to be used for learning as we don t see the tech mature enough yet for resisting nation state actors rules on chain governance using votes as tokens transactions can only be done in quadratic quantities to prevent a monopoly as end game mining reward is airdropped to active nodes that get voted valid if it s a singular human identity taxing is made to idle coins that are not allocated to contracts or delegated to identities voting is real time never ending polls to prevent violent coercion afk a dpos mechanism that can be implemented in smartphone scale hardware that is energy saving vote based a logchain able to store contracts identities votes in a compressed form implemented in a widespread language using best practices motivation all the current implementations of blockchains are tightly coupled with the larger context and problems they e g bitcoin or ethereum are trying to solve this makes understanding blockchains a necessarily harder task than it must be especially source code wisely this project is an attempt to provide as concise and simple implementation of a blockchain as possible what is blockchain from wikipedia https en wikipedia org wiki blockchain database blockchain is a distributed database that maintains a continuously growing list of records called blocks secured from tampering and revision key concepts of naivechain check also this blog post https medium com lhartikk a blockchain in 200 lines of code 963cc1cc0e54 dttbm9afr5 for a more detailed overview of the key concepts http interface to control the node use websockets to communicate with other nodes p2p super simple protocols in p2p communication data is not persisted in nodes no proof of work or proof of stake a block can be added to the blockchain without competition alt tag naivechain blockchain png alt tag naivechain components png quick start set up two connected nodes and mine 1 block npm install http port 3001 p2p port 6001 npm start http port 3002 p2p port 6002 peers ws localhost 6001 npm start curl h content type application json data data some data to the first block http localhost 3001 mineblock quick start with docker set up three connected nodes and mine a block sh docker compose up curl h content type application json data data some data to the first block http localhost 3001 mineblock http api get blockchain curl http localhost 3001 blocks create block curl h content type application json data data some data to the first block http localhost 3001 mineblock add peer curl h content type application json data peer ws localhost 6001 http localhost 3001 addpeer query connected peers curl http localhost 3001 peers | blockchain |
|
learning-papers | landmark papers in machine learning this document attempts to collect the papers which developed important techniques in machine learning research is a collaborative process discoveries are made independently and the difference between the original version and a precursor can be subtle but i ve done my best to select the papers that i think are novel or significant my opinions are by no means the final word on these topics please create an issue or pull request if you have a suggestion landmark papers in machine learning landmark papers in machine learning key key association rule learning association rule learning datasets datasets enron enron imagenet imagenet decision trees decision trees deep learning deep learning alexnet image classification cnn alexnet image classification cnn convolutional neural network convolutional neural network deepface facial recognition deepface facial recognition generative adversarial network generative adversarial network gpt gpt inception classification detection cnn inception classificationdetection cnn long short term memory lstm long short term memory lstm residual neural network resnet residual neural network resnet transformer sequence to sequence modeling transformer sequence to sequence modeling u net image segmentation cnn u net image segmentation cnn vgg image recognition cnn vgg image recognition cnn ensemble methods ensemble methods adaboost adaboost bagging bagging gradient boosting gradient boosting random forest random forest games games alphago alphago deep blue deep blue optimization optimization adam adam expectation maximization expectation maximization stochastic gradient descent stochastic gradient descent miscellaneous miscellaneous non negative matrix factorization non negative matrix factorization pagerank pagerank deepqa watson deepqa watson natural language processing natural language processing latent dirichlet allocation latent dirichlet allocation latent semantic analysis latent semantic analysis word2vec word2vec neural network components neural network components autograd autograd back propagation back propagation batch normalization batch normalization dropout dropout gated recurrent unit gated recurrent unit perceptron perceptron recommender systems recommender systems collaborative filtering collaborative filtering matrix factorization matrix factorization implicit matrix factorization implicit matrix factorization regression regression elastic net elastic net lasso lasso software software mapreduce mapreduce tensorflow tensorflow torch torch supervised learning supervised learning k nearest neighbors k nearest neighbors support vector machine support vector machine statistics statistics the bootstrap the bootstrap credits credits key icon paper behind paywall in some cases i provide an alternative link to the paper if it comes directly from one of the authors freely available version of paywalled paper directly from the author code associated with the paper precursor or historically relevant paper this may be a fundamental breakthrough that paved the way for the concept in question to be developed iteration advancement elaboration or major popularization of a technique blog post or something other than a formal publication website associated with the paper video associated with the paper slides or images associated with the paper papers proceeded by see also indicate either additional historical context or else major developments breakthroughs or applications association rule learning mining association rules between sets of items in large databases 1993 agrawal imielinski and swami citeseerx https citeseerx ist psu edu viewdoc summary doi 10 1 1 40 6984 see also the guha method of automatic hypotheses determination 1966 h jek havel and chytil springer https link springer com article 10 1007 bf02345483 datasets enron the enron corpus a new dataset for email classification research 2004 klimt and yang springer https link springer com chapter 10 1007 978 3 540 30115 8 22 author https bklimt com papers 2004 klimt ecml pdf see also introducing the enron corpus 2004 klimt and yang author https bklimt com papers 2004 klimt ceas pdf imagenet imagenet a large scale hierarchical image database 2009 deng et al ieee https ieeexplore ieee org document 5206848 author http www image net org papers imagenet cvpr09 pdf see also imagenet large scale visual recognition challenge 2015 springer https link springer com article 10 1007 s11263 015 0816 y arxiv https arxiv org abs 1409 0575 author http www image net org challenges lsvrc decision trees induction of decision trees 1986 quinlan springer https link springer com article 10 1007 bf00116251 deep learning alexnet image classification cnn imagenet classification with deep convolutional neural networks 2012 nips https papers nips cc paper 4824 imagenet classification with deep convolutional neural networks convolutional neural network gradient based learning applied to document recognition 1998 lecun bottou bengio and haffner ieee https ieeexplore ieee org document 726791 author http yann lecun com exdb publis pdf lecun 01a pdf see also neocognitron a self organizing neural network model for a mechanism of pattern recognition unaffected by shift in position 1980 fukushima springer https link springer com article 10 1007 bf00344251 see also phoneme recognition using time delay neural networks 1989 waibel hanazawa hinton shikano and lang ieee https ieeexplore ieee org document 21701 see also fully convolutional networks for semantic segmentation 2014 long shelhamer and darrell arxiv https arxiv org abs 1411 4038 deepface facial recognition deepface closing the gap to human level performance in face verification 2014 taigman yang ranzato and wolf facebook research https research fb com publications deepface closing the gap to human level performance in face verification generative adversarial network general adversarial nets 2014 goodfellow et al nips https papers nips cc paper 5423 generative adversarial nets github https github com goodfeli adversarial gpt improving language understanding by generative pre training 2018 aka gpt radford narasimhan salimans and sutskever openai https cdn openai com research covers language unsupervised language understanding paper pdf github https github com openai finetune transformer lm openai https openai com blog language unsupervised see also language models are unsupervised multitask learners 2019 aka gpt 2 radford wu child luan amodei and sutskever openai https cdn openai com better language models language models are unsupervised multitask learners pdf github https github com openai gpt 2 openai https openai com blog better language models see also language models are few shot learners 2020 aka gpt 3 brown et al arxiv https arxiv org abs 2005 14165 openai https openai com blog openai api inception classification detection cnn going deeper with convolutions 2014 szegedy et al ai google https ai google research pubs pub43022 github https github com google inception see also rethinking the inception architecture for computer vision 2016 szegedy vanhoucke ioffe shlens and wojna ai google https ai google research pubs pub44903 see also inception v4 inception resnet and the impact of residual connections on learning 2016 szegedy ioffe vanhoucke and alemi ai google https ai google research pubs pub45169 long short term memory lstm long short term memory 1995 hochreiter and schmidhuber citeseerx http citeseerx ist psu edu viewdoc summary doi 10 1 1 13 634 residual neural network resnet deep residual learning for image recognition 2015 he zhang ren and sun arxiv https arxiv org abs 1512 03385 transformer sequence to sequence modeling attention is all you need 2017 vaswani et al nips http papers nips cc paper 7181 attention is all you need u net image segmentation cnn u net convolutional networks for biomedical image segmentation 2015 ronneberger fischer brox springer https link springer com chapter 10 1007 978 3 319 24574 4 28 arxiv https arxiv org abs 1505 04597 vgg image recognition cnn very deep convolutional networks for large scale image recognition 2015 simonyan and zisserman arxiv https arxiv org abs 1409 1556 author http www robots ox ac uk vgg research very deep iclr https iclr cc archive www lib exe fetch php 3fmedia iclr2015 simonyan iclr2015 pdf youtube https www youtube com watch v oqe 9p51z0s ensemble methods adaboost a decision theoretic generalization of on line learning and an application to boosting 1997 published as abstract in 1995 freund and schapire citeseerx http citeseerx ist psu edu viewdoc summary doi 10 1 1 32 8918 see also experiments with a new boosting algorithm 1996 freund and schapire citeseerx http citeseerx ist psu edu viewdoc summary doi 10 1 1 133 1040 bagging bagging predictors 1996 breiman springer https link springer com article 10 1023 a 1018054314350 gradient boosting greedy function approximation a gradient boosting machine 2001 friedman project euclid https projecteuclid org euclid aos 1013203451 see also xgboost a scalable tree boosting system 2016 chen and guestrin arxiv https arxiv org abs 1603 02754 github https github com dmlc xgboost random forest random forests 2001 breiman and schapire citeseerx http citeseerx ist psu edu viewdoc summary doi 10 1 1 125 5395 games alphago mastering the game of go with deep neural networks and tree search 2016 silver et al nature https www nature com articles nature16961 deep blue ibm s deep blue chess grandmaster chips 1999 hsu ieee https ieeexplore ieee org abstract document 755469 see also deep blue 2002 campbell hoane and hsu sciencedirect https www sciencedirect com science article pii s0004370201001291 via 3dihub optimization adam adam a method for stochastic optimization 2015 kingma and ba arxiv https arxiv org abs 1412 6980 expectation maximization maximum likelihood from incomplete data via the em algorithm 1977 dempster laird and rubin citeseerx http citeseerx ist psu edu viewdoc summary doi 10 1 1 133 4884 stochastic gradient descent stochastic estimation of the maximum of a regression function 1952 kiefer and wolfowitz projecteuclid https projecteuclid org euclid aoms 1177729392 see also a stochastic approximation method 1951 robbins and monro projecteuclid https projecteuclid org euclid aoms 1177729586 miscellaneous non negative matrix factorization learning the parts of objects by non negative matrix factorization 1999 lee and seung nature https www nature com articles 44565 pagerank the pagerank citation ranking bringing order to the web 1998 page brin motwani and winograd citeseerx http citeseerx ist psu edu viewdoc summary doi 10 1 1 38 5427 deepqa watson building watson an overview of the deepqa project 2010 ferrucci et al aaai https www aaai org ojs index php aimagazine article view 2303 natural language processing latent dirichlet allocation latent dirichlet allocation 2003 blei ng and jordan jmlr http jmlr csail mit edu papers v3 blei03a html latent semantic analysis indexing by latent semantic analysis 1990 deerwater dumais furnas landauer and harshman citeseerx http citeseerx ist psu edu viewdoc summary doi 10 1 1 108 8490 word2vec efficient estimation of word representations in vector space 2013 mikolov chen corrado and dean arxiv https arxiv org abs 1301 3781 google code https code google com archive p word2vec neural network components autograd autograd effortless gratients in numpy 2015 icml https indico ijclab in2p3 fr event 2914 contributions 6483 subcontributions 180 attachments 6060 7185 automl short pdf icml https indico ijclab in2p3 fr event 2914 contributions 6483 subcontributions 180 attachments 6059 7184 talk pdf github https github com hips autograd back propagation learning representations by back propagating errors 1986 rumelhart hinton and williams nature https www nature com articles 323533a0 see also backpropagation applied to handwritten zip code recognition 1989 lecun et al ieee https ieeexplore ieee org document 6795724 author http yann lecun com exdb publis pdf lecun 89e pdf batch normalization batch normalization accelerating deep network training by reducing internal covariate shift 2015 ioffe and szegedy icml via pmlr http proceedings mlr press v37 ioffe15 html dropout dropout a simple way to prevent neural networks from overfitting 2014 srivastava hinton krizhevsky sutskever and salakhutdinov jmlr http jmlr org papers v15 srivastava14a html gated recurrent unit learning phrase representations using rnn encoder decoder for statistical machine translation 2014 cho et al arxiv https arxiv org abs 1406 1078 perceptron the perceptron a probabilistic model for information storage and organization in the brain 1958 rosenblatt citeseerx https citeseerx ist psu edu viewdoc summary doi 10 1 1 588 3775 recommender systems collaborative filtering using collaborative filtering to weave an information tapestry 1992 goldberg nichols oki and terry citeseerx http citeseerx ist psu edu viewdoc summary doi 10 1 1 104 3739 matrix factorization application of dimensionality reduction in recommender system a case study 2000 sarwar karypis konstan and riedl citeseerx http citeseerx ist psu edu viewdoc summary doi 10 1 1 29 8381 see also learning collaborative information filters 1998 billsus and pazzani citeseerx http citeseerx ist psu edu viewdoc summary doi 10 1 1 487 3789 see also netflix update try this at home 2006 funk author https sifter org simon journal 20061211 html implicit matrix factorization collaborative filtering for implicit feedback datasets 2008 hu koren and volinsky ieee https ieeexplore ieee org document 4781121 author http yifanhu net pub cf pdf regression elastic net regularization and variable selection via the elastic net 2005 zou and hastie citeseer http citeseerx ist psu edu viewdoc summary doi 10 1 1 124 4696 lasso regression shrinkage and selection via the lasso 1994 tibshirani citeseerx http citeseer ist psu edu viewdoc summary doi 10 1 1 35 7574 see also linear inversion of band limited reflection seismograms 1986 santosa and symes siam https epubs siam org doi 10 1137 0907087 software mapreduce mapreduce simplified data processing on large clusters 2004 dean and ghemawat ai google https ai google research pubs pub62 tensorflow tensorflow a system for large scale machine learning 2016 abadi et al ai google https ai google research pubs pub45381 author https www tensorflow org torch torch a modular machine learning software library 2002 collobert bengio and mari thoz idiap http publications idiap ch index php publications show 712 author http torch ch see also automatic differentiation in pytorch 2017 paszke et al openreview https openreview net forum id bjjsrmfcz github https github com pytorch pytorch supervised learning k nearest neighbors nearest neighbor pattern classification 1967 cover and hart ieee https ieeexplore ieee org abstract document 1053964 see also e fix and j l hodges 1951 an important contribution to nonparametric discriminant analysis and density estimation 1989 silverman and jones jstor https www jstor org stable 1403796 seq 1 support vector machine support vector networks 1995 cortes and vapnik springer https link springer com article 10 1023 a 1022627411411 statistics the bootstrap bootstrap methods another look at the jackknife 1979 efron project euclid https projecteuclid org euclid aos 1176344552 see also problems in plane sampling 1949 quenouille project euclid https projecteuclid org euclid aoms 1177729989 see also notes on bias estimation 1958 quenouille jstor https www jstor org stable 2332914 seq 1 see also bias and confidence in not quite large samples 1958 tukey project euclid https projecteuclid org euclid aoms 1177706647 credits a special thanks to alexandre passos for his comment on this reddit thread https www reddit com r machinelearning comments hj4cx classic papers in machine learning c1vt6ny as well as the responders to this quora post https www quora com what are some of the best research papers or books for machine learning they provided many great papers to get this list off to a great start | machine-learning papers | ai |
iCalendar_2750 | icalendar 2750 my icalendar a1 a4 creation process backup software systems development and integration course | server |
|
iot-smart-home-cloud | smart home device manager this projects contains sample code that demonstrates the use of firebase https firebase google com and google cloud iot core https cloud google com iot core to build a cloud service for consumer smart home devices quickstart set up google cloud 1 select or create a new project in the google cloud console https console cloud google com cloud resource manager 1 visit the cloud iot core page https console cloud google com iot to enable the api 1 follow these instructions https cloud google com iot docs how tos devices to create a device registry and a new device entry when creating a new device entry generate an es256 key you can find details on creating an es256 key pair here https cloud google com iot docs how tos credentials keys generating an es256 key use device events as the default telemetry topic 1 save the project values as environment variables so you can use them later on export project id my project export region us central1 export registry my registry export device id my device export private key file ec private pem 1 visit the firebase console https console firebase google com and click add project from the dashboard choose the name of your existing google cloud project under project name then select add firebase set up actions on google 1 navigate to the actions console http console actions google com 1 select add import project 1 choose the name of your existing google cloud project under project name then select import project 1 choose home control followed by smart home 1 select setup invocation and give your action a name 1 create a unique client id and secret that you will assign to google for use during smart home account linking export client id my client id export client secret my client secret note these values enable the google assistant to identify itself to your action during account linking this is not used to identify any particular user deploy project modules 1 deploy the server module to firebase using the instructions in device manager cloud firebase readme md 1 deploy the web application using the instructions in device manager web web readme md 1 deploy the mobile application using the instructions in device manager mobile mobile readme md 1 run a virtual sample device sample device readme md as either a light or thermostat using the private key generated in the previous step complete smart home setup 1 navigate to the actions console http console actions google com and select the your project 1 configure account linking https developers google com actions identity oauth2 oauth code configure the project for your action set linking type to oauth authorization code then enter the following client information client id value exported as client id during initial setup client secret value generated for client secret during initial setup authorization url https your firebase hosting app link account token url https your cloud functions url token 1 click save 1 provide fulfillment https developers google com actions smarthome create provide fulfillment for your action select build actions from the sidebar and click add your first action enter the following fulfillment url https your cloud functions url fulfillment 1 click done testing your action follow these instructions https developers google com actions smarthome testing deploying to enable testing for your smart home action you can use the google home app https play google com store apps details id com google android apps chromecast app to link your account and control devices handle online status changes optional by default the sample assumes a device is online once it begins receiving state change events from that device you can use the following steps to export the mqtt logs from stackdriver https cloud google com stackdriver which will report connection state changes 1 enable logging for iot core registry navigate to iot core registries page in the cloud console click the id of the registry and then click edit registry at the top of the page under stackdriver logging select info log level click update 1 visit the stackdriver logs https console cloud google com logs in the cloud console 1 enter the following advanced filter resource type cloudiot device jsonpayload eventtype disconnect or connect 1 click create export 1 enter a value for sink name 1 select cloud pub sub for sink service 1 create a new cloud pub sub topic called online state as the sink destination | cloud-iot-core google-assistant | server |
gocv | gocv gocv https raw githubusercontent com hybridgroup gocv release images gocvlogo jpg http gocv io go reference https pkg go dev badge gocv io x gocv svg https pkg go dev gocv io x gocv linux https github com hybridgroup gocv actions workflows linux yml badge svg branch dev https github com hybridgroup gocv actions workflows linux yml windows https ci appveyor com api projects status 9asd5foet54ru69q branch dev svg true https ci appveyor com project deadprogram gocv branch dev go report card https goreportcard com badge github com hybridgroup gocv https goreportcard com report github com hybridgroup gocv license https img shields io badge license apache 202 0 blue svg https github com hybridgroup gocv blob release license txt the gocv package provides go language bindings for the opencv 4 http opencv org computer vision library the gocv package supports the latest releases of go and opencv v4 8 1 on linux macos and windows we intend to make the go language a first class client compatible with the latest developments in the opencv ecosystem gocv supports cuda https en wikipedia org wiki cuda for hardware acceleration using nvidia gpus check out the cuda readme cuda readme md for more info on how to use gocv with opencv cuda gocv also supports intel openvino https software intel com en us openvino toolkit check out the openvino readme openvino readme md for more info on how to use gocv with the intel openvino toolkit how to use hello video this example opens a video capture device using device 0 reads frames and shows the video in a gui window go package main import gocv io x gocv func main webcam gocv openvideocapture 0 window gocv newwindow hello img gocv newmat for webcam read img window imshow img window waitkey 1 face detect gocv https raw githubusercontent com hybridgroup gocv release images face detect jpg this is a more complete example that opens a video capture device using device 0 it also uses the cascadeclassifier class to load an external data file containing the classifier data the program grabs each frame from the video then uses the classifier to detect faces if any faces are found it draws a green rectangle around each one then displays the video in an output window go package main import fmt image color gocv io x gocv func main set to use a video capture device 0 deviceid 0 open webcam webcam err gocv openvideocapture deviceid if err nil fmt println err return defer webcam close open display window window gocv newwindow face detect defer window close prepare image matrix img gocv newmat defer img close color for the rect when faces detected blue color rgba 0 0 255 0 load classifier to recognize faces classifier gocv newcascadeclassifier defer classifier close if classifier load data haarcascade frontalface default xml fmt println error reading cascade file data haarcascade frontalface default xml return fmt printf start reading camera device v n deviceid for if ok webcam read img ok fmt printf cannot read device v n deviceid return if img empty continue detect faces rects classifier detectmultiscale img fmt printf found d faces n len rects draw a rectangle around each face on the original image for r range rects gocv rectangle img r blue 3 show the image in the window and wait 1 millisecond window imshow img window waitkey 1 more examples there are examples in the cmd directory cmd of this repo in the form of various useful command line utilities such as capturing an image file cmd saveimage streaming mjpeg video cmd mjpeg streamer counting objects that cross a line cmd counter and using opencv with tensorflow for object classification cmd tf classifier how to install to install gocv you must first have the matching version of opencv installed on your system the current release of gocv requires opencv 4 8 1 here are instructions for ubuntu raspian macos and windows ubuntu linux installation you can use make to install opencv 4 8 1 with the handy makefile included with this repo if you already have installed opencv you do not need to do so again the installation performed by the makefile is minimal so it may remove opencv options such as python or java wrappers if you have already installed opencv some other way quick install first change directories to where you want to install gocv and then use git to clone the repository to your local machine like this cd home folder with your src git clone https github com hybridgroup gocv git make sure to change home folder with your src to where you actually want to save the code once you have cloned the repo the following commands should do everything to download and install opencv 4 8 1 on linux cd gocv make install if you need static opencv libraries make install build shared libs off if it works correctly at the end of the entire process the following message should be displayed gocv version 0 35 0 opencv lib version 4 8 1 that s it now you are ready to use gocv using cuda with gocv see the cuda directory cuda for information using openvino with gocv see the openvino directory openvino for information make install for openvino and cuda the following commands should do everything to download and install opencv 4 8 1 with cuda and openvino on linux make sure to change home folder with your src to the directory you used to clone gocv cd home folder with gocv make install all if you need static opencv libraries make install all build shared libs off if it works correctly at the end of the entire process the following message should be displayed gocv version 0 35 0 opencv lib version 4 8 1 openvino cuda information device 0 geforce mx150 2003mb sm 61 driver runtime ver 10 0 10 0 complete install if you have already done the quick install as described above you do not need to run any further commands for the curious or for custom installations here are the details for each of the steps that are performed when you run make install first change directories to where you want to install gocv and then use git to clone the repository to your local machine like this cd home folder with your src git clone https github com hybridgroup gocv git make sure to change home folder with your src to where you actually want to save the code install required packages first you need to change the current directory to the location where you cloned the gocv repo so you can access the makefile cd home folder with your src gocv next you need to update the system and install any required packages make deps download source now download the opencv 4 8 1 and opencv contrib source code make download build build everything this will take quite a while make build if you need static opencv libraries make build build shared libs off install once the code is built you are ready to install make sudo install verifying the installation to verify your installation you can run one of the included examples first change the current directory to the location of the gocv repo cd home src gocv io x gocv now you should be able to build or run any of the examples go run cmd version main go the version program should output the following gocv version 0 35 0 opencv lib version 4 8 1 cleanup extra files after the installation is complete you can remove the extra files and folders make clean custom environment by default pkg config is used to determine the correct flags for compiling and linking opencv this behavior can be disabled by supplying tags customenv when building running your application when building with this tag you will need to supply the cgo environment variables yourself for example export cgo cppflags i usr local include export cgo ldflags l usr local lib lopencv core lopencv face lopencv videoio lopencv imgproc lopencv highgui lopencv imgcodecs lopencv objdetect lopencv features2d lopencv video lopencv dnn lopencv xfeatures2d please note that you will need to run these 2 lines of code one time in your current session in order to build or run the code in order to setup the needed env variables once you have done so you can execute code that uses gocv with your custom environment like this go run tags customenv cmd version main go docker the project now provides dockerfile which lets you build gocv https gocv io docker image which you can then use to build and run gocv applications in docker containers the makefile contains docker target which lets you build docker image with a single command make docker by default docker image built by running the command above ships go https golang org version 1 20 2 but if you would like to build an image which uses different version of go you can override the default value when running the target command make docker goversion 1 19 4 running gui programs in docker on macos sometimes your gocv programs create graphical interfaces like windows eg when you use gocv window type when you display an image or video stream running the programs which create graphical interfaces in docker container on macos is unfortunately a bit elaborate but not impossible first you need to satisfy the following prerequisites install xquartz https www xquartz org you can also install xquartz using homebrew https brew sh by running brew cask install xquartz install socat https linux die net man 1 socat brew install socat note you will have to log out and log back in to your machine once you have installed xquartz this is so the x window system is reloaded once you have installed all the prerequisites you need to allow connections from network clients to xquartz here is how you do that first run the following command to open xquart so you can configure it shell open a xquartz click on security tab in preferences and check the allow connections box app image images xquartz png next you need to create a tcp proxy using socat which will stream x window https en wikipedia org wiki x window system data into xquart before you start the proxy you need to make sure that there is no process listening in port 6000 the following command should not return any results shell lsof i tcp 6000 now you can start a local proxy which will proxy the x window traffic into xquartz which acts a your local x server shell socat tcp listen 6000 reuseaddr fork unix client display you are now finally ready to run your gocv gui programs in docker containers in order to make everything work you must set display environment variables as shown in a sample command below shell docker run it rm e display docker for mac host internal 0 your gocv app note since docker for macos does not provide any video device support you won t be able run gocv apps which require camera alpine 3 7 docker image there is a docker image with alpine 3 7 that has been created by project contributor denismakogon https github com denismakogon you can find it located at https github com denismakogon gocv alpine https github com denismakogon gocv alpine raspbian installation we have a special installation for the raspberry pi that includes some hardware optimizations you use make to install opencv 4 8 1 with the handy makefile included with this repo if you already have installed opencv you do not need to do so again the installation performed by the makefile is minimal so it may remove opencv options such as python or java wrappers if you have already installed opencv some other way quick install first change directories to where you want to install gocv and then use git to clone the repository to your local machine like this cd home folder with your src git clone https github com hybridgroup gocv git make sure to change home folder with your src to where you actually want to save the code the following make command should do everything to download and install opencv 4 8 1 on raspbian cd home folder with your src gocv make install raspi if it works correctly at the end of the entire process the following message should be displayed gocv version 0 35 0 opencv lib version 4 8 1 that s it now you are ready to use gocv macos installation you can install opencv 4 8 1 using homebrew if you already have an earlier version of opencv 3 4 x installed you should probably remove it before installing the new version brew uninstall opencv you can then install opencv 4 8 1 brew install opencv pkgconfig installation pkg config is used to determine the correct flags for compiling and linking opencv you can install it by using homebrew brew install pkgconfig verifying the installation to verify your installation you can run one of the included examples first change the current directory to the location of the gocv repo cd home folder with your src gocv now you should be able to build or run any of the examples go run cmd version main go the version program should output the following gocv version 0 35 0 opencv lib version 4 8 1 custom environment by default pkg config is used to determine the correct flags for compiling and linking opencv this behavior can be disabled by supplying tags customenv when building running your application when building with this tag you will need to supply the cgo environment variables yourself for example export cgo cxxflags std c 11 export cgo cppflags i usr local cellar opencv 4 8 1 include export cgo ldflags l usr local cellar opencv 4 8 1 lib lopencv stitching lopencv superres lopencv videostab lopencv aruco lopencv bgsegm lopencv bioinspired lopencv ccalib lopencv dnn objdetect lopencv dpm lopencv face lopencv photo lopencv fuzzy lopencv hfs lopencv img hash lopencv line descriptor lopencv optflow lopencv reg lopencv rgbd lopencv saliency lopencv stereo lopencv structured light lopencv phase unwrapping lopencv surface matching lopencv tracking lopencv datasets lopencv dnn lopencv plot lopencv xfeatures2d lopencv shape lopencv video lopencv ml lopencv ximgproc lopencv calib3d lopencv features2d lopencv highgui lopencv videoio lopencv flann lopencv xobjdetect lopencv imgcodecs lopencv objdetect lopencv xphoto lopencv imgproc lopencv core please note that you will need to run these 3 lines of code one time in your current session in order to build or run the code in order to setup the needed env variables once you have done so you can execute code that uses gocv with your custom environment like this go run tags customenv cmd version main go windows installation the following assumes that you are running a 64 bit version of windows 10 in order to build and install opencv 4 8 1 on windows you must first download and install mingw w64 and cmake as follows mingw w64 download and run the mingw w64 compiler installer from https sourceforge net projects mingw w64 files toolchains 20targetting 20win32 personal 20builds mingw builds 8 1 0 https sourceforge net projects mingw w64 files toolchains 20targetting 20win32 personal 20builds mingw builds 8 1 0 the latest version of the mingw w64 toolchain is 8 1 0 but any version from 8 x on should work choose the options for posix threads and for seh exceptions handling then install to the default location c program files mingw w64 x86 64 8 1 0 posix seh rt v6 rev0 add the c program files mingw w64 x86 64 8 1 0 posix seh rt v6 rev0 mingw64 bin path to your system path cmake download and install cmake https cmake org download https cmake org download to the default location cmake installer will add cmake to your system path opencv 4 8 1 and opencv contrib modules the following commands should do everything to download and install opencv 4 8 1 on windows chdir gopath src gocv io x gocv win build opencv cmd it might take up to one hour last add c opencv build install x64 mingw bin to your system path verifying the installation change the current directory to the location of the gocv repo chdir gopath src gocv io x gocv now you should be able to build or run any of the command examples go run cmd version main go the version program should output the following gocv version 0 35 0 opencv lib version 4 8 1 that s it now you are ready to use gocv custom environment by default opencv is expected to be in c opencv build install include this behavior can be disabled by supplying tags customenv when building running your application when building with this tag you will need to supply the cgo environment variables yourself due to the way opencv produces dlls including the version in the name using this method is required if you re using a different version of opencv for example set cgo cxxflags std c 11 set cgo cppflags ic opencv build install include set cgo ldflags lc opencv build install x64 mingw lib lopencv core481 lopencv face481 lopencv videoio481 lopencv imgproc481 lopencv highgui481 lopencv imgcodecs481 lopencv objdetect481 lopencv features2d481 lopencv video481 lopencv dnn481 lopencv xfeatures2d481 lopencv plot481 lopencv tracking481 lopencv img hash481 please note that you will need to run these 3 lines of code one time in your current session in order to build or run the code in order to setup the needed env variables once you have done so you can execute code that uses gocv with your custom environment like this go run tags customenv cmd version main go android there is some work in progress for running gocv on android using gomobile for information on how to install opencv gocv for android please see https gist github com ogero c19458cf64bd3e91faae85c3ac887481 see original discussion here https github com hybridgroup gocv issues 235 profiling since memory allocations for images in gocv are done through c based code the go garbage collector will not clean all resources associated with a mat as a result any mat created must be closed to avoid memory leaks to ease the detection and repair of the resource leaks gocv provides a mat profiler that records when each mat is created and closed each time a mat is allocated the stack trace is added to the profile when it is closed the stack trace is removed see the runtime pprof documentation https golang org pkg runtime pprof profile in order to include the matprofile custom profiler you must build or run your application or tests using the tags matprofile build tag for example go run tags matprofile cmd version main go you can get the profile s count at any time using go gocv matprofile count you can display the current entries the stack traces with go var b bytes buffer gocv matprofile writeto b 1 fmt print b string this can be very helpful to track down a leak for example suppose you have the following nonsense program go package main import bytes fmt gocv io x gocv func leak gocv newmat func main fmt printf initial matprofile count v n gocv matprofile count leak fmt printf final matprofile count v n gocv matprofile count var b bytes buffer gocv matprofile writeto b 1 fmt print b string running this program produces the following output initial matprofile count 0 final matprofile count 1 gocv io x gocv mat profile total 1 1 0x40b936c 0x40b93b7 0x40b94e2 0x40b95af 0x402cd87 0x40558e1 0x40b936b gocv io x gocv newmat 0x4b go src gocv io x gocv core go 153 0x40b93b6 gocv io x gocv newmat 0x26 go src gocv io x gocv core go 159 0x40b94e1 main leak 0x21 go src github com dougnd gocvprofexample main go 11 0x40b95ae main main 0xae go src github com dougnd gocvprofexample main go 16 0x402cd86 runtime main 0x206 usr local cellar go 1 11 1 libexec src runtime proc go 201 we can see that this program would leak memory as it exited it had one mat that was never closed the stack trace points to exactly which line the allocation happened on line 11 the gocv newmat furthermore if the program is a long running process or if gocv is being used on a web server it may be helpful to install the http interface for example go package main import net http net http pprof time gocv io x gocv func leak gocv newmat func main go func ticker time newticker time second for ticker c leak http listenandserve localhost 6060 nil this will leak a mat once per second you can see the current profile count and stack traces by going to the installed http debug interface http localhost 6060 debug pprof gocv io x gocv mat http localhost 6060 debug pprof gocv io x gocv mat debug 1 how to contribute please take a look at our contributing md contributing md document to understand our contribution guidelines then check out our roadmap md roadmap md document to know what to work on next why this project exists the https github com go opencv go opencv https github com go opencv go opencv package for go and opencv does not support any version above opencv 2 x and work on adding support for opencv 3 had stalled for over a year mostly due to the complexity of swig http swig org that is why we started this project the gocv package uses a c style wrapper around the opencv 4 c classes to avoid having to deal with applying swig to a huge existing codebase the mappings are intended to match as closely as possible to the original opencv project structure to make it easier to find things and to be able to figure out where to add support to gocv for additional opencv image filters algorithms and other features for example the opencv videoio module https github com opencv opencv tree master modules videoio wrappers can be found in the gocv package in the videoio files this package was inspired by the original https github com go opencv go opencv project the blog post https medium com peterleyssens using opencv 3 from golang 5510c312a3c and the repo at https github com sensorbee opencv thank you all license licensed under the apache 2 0 license copyright c 2017 2021 the hybrid group logo generated by gopherizeme https gopherize me | opencv golang video computer-vision video-capture face-tracking mjpeg mjpeg-stream image-processing tensorflow caffe computervision openvino dnn gocv torch object-tracking object-classification cuda | ai |
CS205FinalProject | cs205finalproject client server weather database application for cs205 software engineering | server |
|
CanteenQueue | hello world | os |
|
CloudModule | cloudmodule internet server engineering and the cloud module at anglia ruskin univeristy 2016 this project implements a lamp based webhosting service according to the specification provided by the fictional business owner john great the project aims to fulfil all the required and desired features of the specification this document provides a detailed description of the implemented features as well as technical details about the implementation it also discusses the ways that used to deploy and demonstrate the system finally the document also aims to provide evidence of the functionality through various test scenarios please read the full documentation documentation github pdf | cloud |
|
Development | eburaq solutions information technology amp services | server |
|
BlockChain-Security-List | blockchain security list about cryptocurrency security reverse exploit fuzz list alt text https avatars2 githubusercontent com u 25600994 s 400 v 4 tools mythril https github com consensys mythril security analysis tool for ethereum smart contracts manticore https github com trailofbits manticore symbolic execution tool slither https trailofbits wufoo com forms m1qfujq31qyj9ee slither combines a set of proprietary static analyses on solidity porosity https github com comaeio porosity decompiler and security analysis tool for blockchain based ethereum smart contracts echidna https github com trailofbits echidna ethereum fuzz testing framework oyente https github com melonproject oyente an analysis tool for smart contracts maian https github com maian tool maian automatic tool for finding trace vulnerabilities in ethereum smart contracts ethersplay https github com trailofbits ethersplay a graphical evm disassembler with advanced features binja ida evm https github com trailofbits ida evm ida processor module for the ethereum virtual machine evmdis https github com arachnid evmdis evm disassembler securify https securify ch formal verification of ethereum smart contracts rattle https trailofbits wufoo com forms m1qfujq31qyj9ee rattle is an evm static analyzer that analyzes the evm bytecode directly for vulnerabilities diligence https consensys net diligence security services tools and best practices for the ethereum ecosystem fuildai https fluidai co fluid is an ai that can automatically find and fix fatal security vulnerabilities in smart contracts bp nodes security checklist eos bp nodes security checklist eos https github com slowmist eos bp nodes security checklist vechain core nodes security checklist https github com slowmist vechain core nodes security checklist ontology triones service node security checklist https github com slowmist ontology triones service node security checklist blogs https bcsec org peckshield inc blog https www peckshield com blog html security archives ethereum blog https blog ethereum org category security blockchain sec https blockchain sec com https www cmcmbc com zh cn blog https blog csdn net u011721501 article category 7483965 trailofbits blockchain https blog trailofbits com category blockchain blackhat pdf for cansecwest 2018 https cansecwest com slides 2018 blackhat 20ethereum 20 20ryan 20stortz 20and 20jay 20little 20trail 20of 20bits 20inc pdf blackhat ethereum solidified https medium com solidified parity hack how it happened and its aftermath 9bffb2105c0 parity hack arvanaghi 1 https arvanaghi com blog reversing ethereum smart contracts reversing ethereum smart contracts arvanaghi 2 https arvanaghi com blog reversing ethereum smart contracts pt2 reversing ethereum smart contracts 2 ret2 https blog ret2 io 2018 05 16 practical eth decompilation practical eth decompilation loom network https medium com loom network how to secure your smart contracts 6 solidity vulnerabilities and how to avoid them part 1 c33048d4d17d 6 vulnerabilities and how to avoid them part 1 eth assembly https medium com xjonathan reverse engineering ethereum smart contract lets talk assembly 10c38b8e3c2 lets talk assembly radare2 https blog positive com reversing evm bytecode with radare2 ab77247e5e53 reversing evm bytecode with radare2 etherum security tools https blog trailofbits com 2018 03 23 use our suite of ethereum security tools trailofbits ethereum security tools hackernoon https hackernoon com scanning ethereum smart contracts for vulnerabilities b5caefd995df analyzing ethereum smart contracts for vulnerabilities nccgroup https www nccgroup trust us our research discovering smart contract vulnerabilities with goatcasino style cyber security discovering smart contract vulnerabilities with goatcasino arseny reutov https blog positive com predicting random numbers in ethereum smart contracts e5358c6b8620 predicting random numbers in ethereum smart contracts funfair https funfair io randomness is a big deal randomness is a big deal training ethernaut https ethernaut zeppelin solutions level 0x6545df87f57d21cb096a0bfcc53a70464d062512 the ethernaut is a web3 solidity based wargame goatcasino https github com nccgroup goatcasino goatcasino is a truffle project which deploys a set of intentionally vulnerable smart contracts events blockchain graveyard https magoo github io blockchain graveyard coindesk https www coindesk com s search keyword like hack attack 36kr tag anquan https 36kr com tags anquan cnn bitcoin crime https www ccn com bitcoin crime scmagazineuk cryptocurrency https www scmagazineuk com cryptocurrency topic 48080 vulnerabilities dasp http www dasp co smart contract best practices https github com consensys smart contract best practices bitcoinwiki weaknesses https en bitcoin it wiki weaknesses bitcoinwiki cves https en bitcoin it wiki common vulnerabilities and exposures go ethereum issue vuln https github com ethereum go ethereum issues utf8 e2 9c 93 q label 3avuln examples of solidity security issues https github com trailofbits not so smart contracts scanning ethereum smart contracts for vulnerabilities https hackernoon com scanning ethereum smart contracts for vulnerabilities b5caefd995df smart contract security https blog ethereum org 2016 06 10 smart contract security solidity security considerations http solidity readthedocs io en latest security considerations html 2018 03 20 https mp weixin qq com s kk2lsoq1679gda56ec zjg eosio p2p sybil attack 2018 05 29 https github com slowmist papers blob master eosio p2p sybil attack en pdf eosio p2p 2018 05 29 https github com slowmist papers blob master eosio p2p sybil attack zh md epod ethereum packet of death cve 2018 12018 https www peckshield com 2018 06 27 epod new evilreflex bug identified in multiple erc20 smart contracts cve 2018 12702 cve 2018 12703 https www peckshield com 2018 06 23 evilreflex misc dasp http dasp co decentralized application security project or dasp top 10 of 2018 not so smart conracts https github com trailofbits not so smart contracts examples of solidity security issues evm opcodes https github com trailofbits evm opcodes ethereum opcodes and instruction reference threats go ethereum issue bug https github com ethereum go ethereum issues q is 3aopen is 3aissue label 3abug solidity issue bug https github com ethereum solidity issues utf8 e2 9c 93 q label 3abug reddit ethereum https www reddit com r ethereum bitcointalk https bitcointalk org index php board 6 0 stackexchange ethereum security https ethereum stackexchange com questions tagged security stackexchange bitcoin security https bitcoin stackexchange com questions tagged security paper dasp top10 https github com slowmist knowledge base blob master dasp top10 chinese pdf solidity https github com slowmist knowledge base blob master solidity security comprehensive list of known attack vectors and common anti patterns chinese md https bcsec org blockchainsecurity v1 pdf https chaitin cn cn download blockchain security guide 20180507 pdf hacking blockchain https www rsaconference com writable presentations file upload fon4 t11 hacking blockchain pdf bgp hijacking https en wikipedia org wiki bgp hijacking safe wallet white paper https www cmcmbc com zh cn blog research 2018 04 18 79 html blockchains how to steal millions in 264 operations https research kudelskisecurity com 2018 01 16 blockchains how to steal millions in 264 operations quantum attacks on bitcoin and how to protect against them https arxiv org pdf 1710 10377 pdf eclipse attacks on bitcoin s peer to peer network http cs people bu edu heilman eclipse smarter https eprint iacr org 2016 633 pdf making smart contracts smarter yellow paper https ethereum github io yellowpaper paper pdf ethereum a secure decentralised generalised transaction ledger solidity call https paper seebug org category blockchain owner cve https paper seebug org 627 morphtoken https paper seebug org 630 https paper seebug org 631 solidity call https paper seebug org 633 reports new allowanyone bug identified in multiple erc20 smart contracts https peckshield com 2018 05 29 eosoob analyzing and reproducing the eos out of bound write vulnerability in nodeos https peckshield com 2018 05 29 eosoob audit report of iohk s etc wallet https research kudelskisecurity com 2018 01 26 audit report of iohks etc wallet audit report of the waves platform https research kudelskisecurity com 2017 10 10 audit report of the waves platform awesomes solidity audit checklist https github com miguelmota solidity audit checklist eos bp nodes security checklist https github com slowmist eos bp nodes security checklist pentesting ethereum dapps https arvanaghi com blog pentesting ethereum dapps awesome https github com sindresorhus awesome blockchain security awesome https github com 0xmrcat blockchain security awesome awesome ethereum https github com btomashvili awesome ethereum awesome ethereum virtual machine https github com pirapira awesome ethereum virtual machine jobs slowmist https www slowmist com ethercasts https jobs ethercasts com solidified https solidified io codementor https www codementor io solidity developers iosiro https www iosiro com the author i m thanks to all blockchain security researchers thanks blackhat pdf for cansecwest 2018 | blockchain |
|
brackets-portable | brackets portable license https img shields io badge license mit blue svg https github com sagiegurari brackets portable blob master license downloads https img shields io github downloads sagiegurari brackets portable total svg https github com sagiegurari brackets portable releases latest windows portable version of adobe brackets web development editor overview brackets http brackets io is an open source code editor for web designers and front end developers with brackets portable you can now install it on a usb and have it with you at all times this portable launcher with brackets embedded will not leave any file registry leftovers in your pc and will store all information in the portable folder all custom extensions you install will also be stored in the portable folder and will carried with you in your usb you can also replace the brackets installation inside this portable version with any version you like the portable launcher uses the portableapps com http portableapps com installer which also allows you to better integrate with your portableapps com http portableapps com installation this is of course optional download in order to download please look at the releases tab at https github com sagiegurari brackets portable releases latest and download the exe file license developed by sagie gur ari and licensed under the mit open source license building from source in order to build from source there are few steps to be taken build bracketsportable exe this one actually needs to be handled only once even if upgrading the brackets io installation br to generate the exe files you must use the portableapps com launcher generator and point it to the main directory git root br the generator uses the files in the appinfo directory to generate the exe files br you can later on modify the launcher ini files without any need of regenerating the exe files build bracketsportable release version english paf exe this step needs to be taken for any change including upgrade of the brackets io installation update the brackets io files in the brackets folder copy vcruntime140 dll from the other folder to the brackets folder update the version in the appinfo ini use the portableapps com installer to generate the new installer | portable portableapps brackets brackets-portable windows-portable editor web-editor ide | front_end |
SmartHotel360-IoT | this project is retired archived and no longer supported you are welcome to continue to use and fork the repository for the latest sample references visit https aka ms tailwindtraders https aka ms rpsls smarthotel360 during connect 2017 event this year we presented beautiful app demos using xamarin and many features of azure for build 2018 s keynote we updated some components of the back end api code to support azure kubernetes service aks this repository contains the setup instructions and sample code needed for the internet of things iot demo utilizing digital twins that was announced at ignite 2018 smarthotel360 repos for this reference app scenario we built several consumer and line of business apps and an azure backend you can find all smarthotel360 repos in the following locations smarthotel360 https github com microsoft smarthotel360 iot https github com microsoft smarthotel360 iot mixed reality https github com microsoft smarthotel360 mixedreality backend https github com microsoft smarthotel360 backend website https github com microsoft smarthotel360 website mobile https github com microsoft smarthotel360 mobile sentiment analysis https github com microsoft smarthotel360 sentimentanalysis registration https github com microsoft smarthotel360 registration smarthotel360 iot demo welcome to the smarthotel360 iot repository here you ll find everything you need to run the website and backend for the iot demo iot demo architecture diagram documents images architecture png iot demo architecture check out our channel9 iot show video https channel9 msdn com shows internet of things show smarthotel 360 a demo powered by azure digital twins about the smarthotel360 demo powered by digital twnis smarthotel360 iot demo powered by azure digital twins https img youtube com vi urcmafvqnf4 0 jpg https www youtube com watch v urcmafvqnf4 getting started smarthotel360 uses a microservice oriented architecture implemented using containers for the iot demo there are various services developed in different technologies net core 2 asp net core 2 and angular these services use different azure resources like digital twins app services cosmos db event hubs azure functions and iot hubs to name a few the step by step walkthrough for creating and provisioning the demo can be found next in the setup setup section end to end setup takes about an hour provided you have all of the development environment prerequisites met and that your user has the required permissions in your azure subscription demo scripts you can find a demo scripts documents demoscript with a walkthroughs once you have finished the setup of this demo setup prerequisites powershell for running provisioning azure provisioning scripts powershell core https docs microsoft com en us powershell scripting setup installing powershell core on macos view powershell 6 is available for mac and linux users docker http www docker com to build the containers visual studio 2017 https www visualstudio com with the net desktop development and asp net and web development workloads installed azure cli https docs microsoft com en us cli azure install azure cli view azure cli latest kubernetes cli https kubernetes io docs tasks tools install kubectl angular cli https cli angular io you also will need the azure iot extension for azure cli you can install it with the following command az extension add n azure cli iot ext note we have updated the deployment script to work with version 0 7 0 or higher required azure subscription permissions 1 create and modify azure ad application registrations or have someone else do it for you 2 create a new service principal for role based access control rbac or have someone else do it for you 3 create or add 2 new guest users to the active directory ad or have someone else do it for you and get you the object ids of those users 4 create a resourcegroup or have one that someone else already created for you to use 5 create a deployment into a resourcegroup 6 give the service principal in 2 read permissions to read from the acr created by the deployment if not then script provides the user with an azure cli command to execute to be run by someone with the required permission and pauses until the user says this step has been completed set up a service principal and register an azure active directory application follow these instructions to create a service principal and register an azure active directory application https docs microsoft com en us azure azure resource manager resource group create service principal portal view azure cli latest choose web app api as the application type during the creation process you will need to take note of the following information tenant id app id app key obtain the service principal id to obtain the service principal id open a powershell window and follow these steps 1 login azurermaccount subscriptionid subcription id 2 get azurermadserviceprincipal applicationid app id if azurerm is not installed you will receive errors saying that it needs to be installed run the following command in an administrator powershell install module force azurerm set permissions and security for the application click settings required permissions digital twins api click add on the top left under select an api type azure then choose azure digital twins azure smart spaces service note if this option does not show you may need to register the digital twins resource provider using the following steps in a powershell window 1 login azurermaccount subscriptionid subcription id 2 register azurermresourceprovider providernamespace microsoft iotspaces 3 wait until the provider registration is complete can be checked via get azurermresourceprovider providernamespace microsoft iotspaces check the read write access delegated permissions box save time series insights api click add on the top left under select an api type azure then choose azure time series insights note if this option does not show you may need to register the time series insights resource provider using the following steps in a powershell window 1 login azurermaccount subscriptionid subcription id 2 register azurermresourceprovider providernamespace microsoft timeseriesinsights 3 wait until the provider registration is complete can be checked via get azurermresourceprovider providernamespace microsoft timeseriesinsights check the access azure time series insights service delegated permissions box save click grant permissions right next to the add button create a service principal for aks cluster to create a service principal for an aks cluster open a powershell command prompt bash window and follow these steps 1 az login 2 az account set s subscription id 3 az ad sp create for rbac skip assignment the sp create for rbac command will return a json object that will have the information needed later in this process json appid aks app id displayname aks display name name aks uri password aks service principal password tenant aks tenant id create iot demo users you need to create users having access to your aad these can either be users created in your aad or guest users that you add for all of these users you need to collect the object id for them and update source arm useraadobjectids json with those values to get the object id view the user in aad and you will see object id under the identity section this is a similar process to using the admin center of a subscription backed by an office 365 environment http blog schertz name 2018 06 locating ids in azure ad the following users are required for this demo 1 head of operations this user is able to view all the hotel brands and below 2 hotel brand 1 manager this user is able to view all the hotels under the first brand 3 hotel 1 manager this user is able to view all the floors under the first hotel 4 hotel 1 employee this user is able to view non vip floors under the first hotel the following users are optional they help provide more visibility into the role based access control rbac functionality of digital twins 1 hotel brand 2 manager 2 hotel 2 manager 3 hotel 3 manager 4 hotel 4 manager 5 hotel 5 manager 6 hotel 6 manager 7 hotel 7 manager 8 hotel 8 manager 9 hotel 9 manager 10 hotel 10 manager provision resources in azure in source arm folder of this repository is the deployment script to create and stand up all of the resources to run this demo in azure to execute the deployment script run the following in a powershell window powershell deploy ps1 subscriptionid subscription id resourcegroupname resource group name resourcegrouplocation resource group location clientid app id clientsecret app key clientserviceprincipalid service principal id aksserviceprincipalid aks service principal app id aksserviceprincipalkey aks service principal password the following information parameters are required for the deployment script subscription id the azure subscription id that has been used in this setup resource group name the resource group name to add the created resource if it doesn t exist it will be created resource group location location for the resource group ie westus2 app id app id obtained from creating an aad app set up a service principal and register an azure active directory application app key app key obtained from creating an aad app set up a service principal and register an azure active directory application service principal id service principal id from above obtain the service principal id aks service principal app id aks app id from above create a service principal for aks cluster aks service principal password aks service principal password from above create a service principal for aks cluster there is a collection of parameters that are used by the deployment script that determine properties like resource location pricing tiers and naming if you wish to modify any of these parameters you can edit the values in parameters json arm parameters json note in order to support the number of virtual devices required for the demo in the kubernetes cluster it will deploy 3 nodes please be aware that this can be a large cost the resource group should look like this documents images azureportal png note due the amount of resources of this demo the consumption of azure is around 200 approximately per month with three nodes on the aks cluster depending on the azure region with the default paramenters demo provisioning info this demo only creates active devices in 1 hotel smarthotel360 sh360 elite 1 to reduce the deployment time as well as cost in azure if you want to have devices active in every hotel you will need to add the following parameters when executing the deployment script digitaltwinsprovisioningtemplatefilepath this should be set to digitaltwinsprovisioning full smarthotel site provisioning yaml this template ensures that the digital twins provisioning and the iot hub device creation have devices in every single room numberofaksnodes this should be set to 10 the number of virtual devices running in the kubernetes cluster increases by 4 times for the full data and therefore the number of nodes running all those pods needs to increase note the full deployment can take well over an hour making digital twins provisioning changes if you choose to modify any of the provisioning by increasing the number of rooms that are included in a floor a new floorplan found in source arm images floorplans file will be required otherwise any new rooms will most likely not be displayed or accessible in the floorplan view make sure to mimic the svg structure and id naming to ensure the website functions properly user settings when the deployment script is complete it will output a usersettings json file with information needed for the rest of the deployment json tenantid tenant id clientid client id aadreplyurl facility management web reply uri for adal digitaltwinsmanagementendpoint digital twins management endpoint digitaltwinsmanagementapiendpoint digital twins management api endpoint facilitymanagementwebsiteuri url to the facility management website facilitymanagementapiuri facility management api facilitymanagementapiendpoint facility management api endpoint storageconnectionstring connection string to azure storage account eventhubconsumerconnectionstring consumer connection string to the event hub iothubconnectionstring connection string to the iot hub cosmosdbconnectionstring connection string to the cosmos db azuremapskey auth key to connect to the azure maps resource roomdevicesapiendpoint room devices api endpoint needed for running the xamarin mobile clients demoroomspaceid space id of the room needed for running demos using the xamarin mobile clients demoroomkubernetesdeployment name of the demo room kubernetes deployment devicerelayfunctionendpoint uri of the device azure function devicerelayfunctionkey default key of the device azure function note if you are going to run the iot demo for the xamarin mobile apps https github com microsoft smarthotel360 mobile desktop apps iot demo then you will need the roomdevicesapiendpoint and mobileroomspaceid values from the usersettings json file important anytime you re run deploy ps1 make sure to revert the following files first otherwise they will not be updated properly source backend smarthotel physicaldevices smarthotel physicaldevices mxchip device config h source facilitymanagementwebsite smarthotel facilitymanagementweb smarthotel facilitymanagementweb clientapp src environments environment ts source facilitymanagementwebsite smarthotel facilitymanagementweb smarthotel facilitymanagementweb clientapp src environments environment prod ts add time series insights data access policy you will need to give the azure ad application you created earlier set up a service principal and register an azure active directory application access to the time series insights environment for the charts to work 1 upon completion of the deployment navigate to the time series insights environment that was created in the portal it s name should be something like sh360iot tsi 2 select data access policies from the left side menu 3 click add from the top left 4 under select user enter the clientid value from the usersettings json file from the user settings user settings into the search box and then choose the ad application when it shows up 5 under select role check reader and contributor 6 click ok at the writing of this we were unable to get the arm template deployment to create this data access policy successfully thus requiring the manual step success to verify that everything is working correctly open up the facilitymanagementwebsiteuri from the usersettings json in the browser and log in with one of the two users created during the provisioning steps changing the chart timerange in the facility management website by default the chart in the website will show data for the last day if you wish to see more days back from today you can update the application settings to have an additional field tsihowmanydays and enter an integer greater than 1 keep in mind that the more days you show the more information will be shown on the map and the worse it may look running locally optional portions of this demo can be run locally in order to do so you still must complete the setup setup section once you have completed the provisioning you can follow these steps to configure build and deploy the resource locally azure function the sensor data function can run locally in visual studio however in order to avoid conflicts you must first disable the azure function that was created during setup setup 1 log in to the azure portal https portal azure com 2 navigate to function apps and select the azure function that was created during setup setup 3 click the stop button to disable the azure function 4 open the source backend smarthotel services smarthotel services sln solution in visual studio 2017 5 set the smarthotel services sensordatafunction project as the startup project 6 right click the smarthotel services sensordatafunction project in the solution explorer 7 add a new json file named local settings json and set the contents to this json isencrypted false values azurewebjobsstorage storage connection string azurewebjobsdashboard storage connection string functions worker runtime dotnet eventhubconnectionstring event hub consumer connection string cosmosdbconnectionstring cosmos db connection string storage connection string storageconnectionstring from the usersettings json file from the user settings user settings section event hub consumer connection string eventhubconsumerconnectionstring from the usersettings json file from the user settings user settings section cosmos db connection string cosmosdbconnectionstring from the usersettings json file from the user settings user settings section 8 run in debug mode iot devices while running the devices locally we need to remove the instances that exist in the kubernetes cluster run the following steps from a powershell command prompt bash window 1 kubectl delete pods deployments replicasets all this removes all pods from the cluster including the room devices api pod 2 if not running the room devices api locally then re deploy that pod to the cluster change directory to source backend smarthotel services kubectl apply f deployments demo yaml to redeploy the devices to the cluster change directory to source backend smarthotel devices kubectl apply f deployments demo yaml apis the apis can be run locally at the same time as their azure counterparts running via docker from a powershell command prompt bash window 1 change directory to source backend smarthotel services 2 docker compose build only required if you re making changes and want to see them 3 docker compose f docker compose yml f docker compose override yml up running via visual studio 1 open the source backend smarthotel services smarthotel services sln solution in visual studio 2017 2 select either the smarthotel services facilitymanagement or smarthotel services facilitymanagement project as the startup project 3 update the appsettings json file smarthotel services facilitymanagement managementapiurl digitaltwinsmanagementendpoint from the usersettings json file from the user settings user settings section mongodbconnectionstring cosmosdbconnectionstring from the usersettings json file from the user settings user settings section smarthotel services roomdevicesapi iothubconnectionstring iothubconnectionstring from the usersettings json file from the user settings user settings section databaseconnectionstring cosmosdbconnectionstring from the usersettings json file from the user settings user settings section 4 run in debug mode website the website can be run locally at the same time as its azure counterpart 1 open the source facilitymanagementwebsite smarthotel facilitymanagementweb smarthotel facilitymanagementweb sln solution in visual studio 2017 2 if you desire the website to connect to the facility management api in azure then run in debug mode 3 otherwise update the environment ts and environment prod ts files under smarthotel facilitymanagementweb clientapp src environments javascript export const environment production true version production sensordatatimer sensordatatime adalconfig tenant tenantid clientid clientid endpoints apiuri clientid as adal config apiendpoint apiendpoint resourceid 0b07f429 9f4b 4714 9392 cc5e8e80c8b0 apiuri must be updated to point to wherever your local facility management api is running e g http localhost 3000 apiendpoint must be updated to point to wherever your local facility management api is running but append api e g http localhost 3000 api 4 then run in debug mode physical devices in order to run a physical device we need to remove the virtual device that exists in the kubernetes cluster otherwise they will be sending conflicting messages to digital twins run the following steps from a powershell command prompt bash window 1 kubectl delete deployments deploymentname replace deploymentname with the demoroomkubernetesdeployment value from the user settings user settings section this removes the pod running the virtual device from the cluster to redeploy the virtual device pod to the cluster when done with the physical device 1 change directory to source backend smarthotel devices 2 kubectl apply f deployments demo yaml this will attempt to deploy all the virtual devices since we only removed the one deployment it will show as created and the rest will show as unchanged mxchip mxchip setup to set up an mxchip as one of our room devices follow the instructions from get started with mxchip iot devkit https github com microsoft vscode iot workbench blob master docs iot devkit devkit get started md important make sure the device is not connected via usb when installing the arduino ide and st link driver otherwise you may need to repeat the process for vs code to see the device skip the instructions in the open iot workbench examples section instead open the project workspace source backend smarthotel physicaldevices smarthotel physicaldevices mxchip project code workspace in vs code also note that in the provision azure service section you should select your iot hub and the device named in the demoiothubdeviceid value from the user settings user settings section the instructions from the serial monitor usage section and beyond can be ignored once the sketch code is successfully deployed to the mxchip it will automatically run anytime it is powered note if you receive a fatal error stating that a header file a h file could not be found simply try again mxchip demo for this demo we are utilizing a number of the built in sensors components of the device temperature the built in temperature sensor is used to determine the current temperature the current and desired temperature values are shown on the display occupancy the integrated magnetometer is being utilized to demonstrate the ability to detect the room occupancy it is mimicking the idea that we could detect the opening and closing of a door with a magnet on it in order to toggle the occupancy status of the room simply bring a strong magnet a small rare earth magnet works well near the sensor at the bottom center of the mxchip board the last line on the display will toggle between vacant and occupied each time the magnet is brought near the sensor in case the magnetometer is not working properly pressing and releasing button a will provide the same toggle effect light the color of rgb led indicates what the current setting of the room s light is 0 30 blue 31 65 green 66 100 red the current and desired light percentage values are shown on the display the mxchip will only send messages when there is a change in the sensor data but minor fluctuations in temperature can result in frequent messages stop sending messages you can use the azure portal to invoke the stopdevicefeed method on the device the last line of the mxchip s display will then display idle indicating that no data is being sent start sending messages either reboot the mxchip or invoke the startdevicefeed method mxchip architecure below is diagram showing how the mxchip integrates into the existing architecture note the iot hub azure function and digital twins are the same as displayed in the main architecture diagram smarthotel360 iot demo iot demo mxchip architecture diagram documents images mxchip architecture png iot demo mxchip architecture diagram basic authentication mode the facility management website and api both support being downgraded from using adal to a very simple basic authentication this mode is read only meaning sliders are not available on the rooms to change the desired temperature and light values note this mode is not recommended unless absolutely desired downgrading facility management api to basic authentication mode the following application settings must be supplied in addition to the ones that are supplied via the deployment once set the api will downgrade to basic auth basicauth username whatever username you desire this will be the username that must be supplied when logging into the website basicauth password whatever password you desire this will be the password that must be supplied when logging into the website to verify this change is working navigate to the facilitymanagementapiuri from the usersettings json file from the user settings user settings section and add swagger to the end in the swagger ui click the authorize button that will show in the top right corner and the dialog that pops up should say basic authorization downgrading facility management website to basic authentication mode the following application settings must be supplied in addition to the ones that are supplied via the deployment once set the website will downgrade to basic auth usebasicauth true to verify this change is working navigate to the facilitymanagementwebsiteuri from the usersettings json file from the user settings user settings section and you will see fields to enter a username and password to login contributing this project welcomes contributions and suggestions most contributions require you to agree to a contributor license agreement cla declaring that you have the right to and actually do grant us the rights to use your contribution for details visit https cla microsoft com when you submit a pull request a cla bot will automatically determine whether you need to provide a cla and decorate the pr appropriately e g label comment simply follow the instructions provided by the bot you will only need to do this once across all repos using our cla this project has adopted the microsoft open source code of conduct https opensource microsoft com codeofconduct for more information see the code of conduct faq https opensource microsoft com codeofconduct faq or contact opencode microsoft com mailto opencode microsoft com with any additional questions or comments | server |
|
data_engineering_practices | a repo which includes some data engineering practices with the different databases datasets bristol uk air quality continuous data https www kaggle com datasets visalakshiiyer air quality uk bristol air quality data from 2014 to 2022 | server |
|
titanet | titanet p align center img src assets models titanet architecture png alt titanet architecture style width 450px p this repository contains a small scale implementation of the following paper titanet neural model for speaker representation with 1d depth wise separable convolutions and global context nithin rao koluguri taejin park boris ginsburg https arxiv org abs 2110 04410 it is small scale because we only rely on the librispeech dataset instead of using voxceleb1 voxceleb2 sre fisher switchboard and librispeech as done in the original work the main reason for this choice is related to resources as the combined dataset has 3373 hours of speech with 16681 speakers and 4890k utterances which is quite big to be trained on google colab instead the librispeech subset that we consider has about 100 hours of speech with 251 speakers and 28 5k utterances which is sufficient to test the capabilities of the model moreover we only test titanet on the speaker identification and verification tasks instead of also testing it on speaker diarization installation in order to install all the dependencies required by the project you need to make sure to have python 3 9 installed on your system then run the following commands to create a virtual environment and install the required libraries bash python3 m venv venv source venv bin activate pip install r init requirements txt execution both training and testing parts of the project are managed through a jupyter notebook titanet ipynb titanet ipynb the notebook contains a broad analysis of the dataset in use an explanation of all the data augmentation techniques reported in the paper a description of the baseline and titanet models and a way to train and test them hyper parameters are handled via the parameters yml file to run the jupyter notebook execute the following command bash jupyter notebook titanet ipynb if you just want to train a model from scratch you can directly rely on the train py module which can be called in the following way bash python3 src train py p parameters yml training and evaluation metrics along with model checkpoints and results are directly logged into a w b project which is openly accessible here https wandb ai wadaboa titanet in case you want to perform a custom training run you have to either disable w b see parameters yml or provide your own entity your username project and api key file location in the parameters yml file the w b api key file is a plain text file that contains a single line with your w b api key that you can get from here https wandb ai authorize training validation this section shows training and validation metrics observed for around 75 epochs in case you want to see more metrics please head over to the w b project https wandb ai wadaboa titanet baseline ce vs titanet ce this experiment compares training and validation loss and accuracy of the baseline and titanet models trained with cross entropy loss as we can see training metrics reach similar values while validation metrics are much better with titanet moreover plots suggest that the baseline model had a slight overfitting problem training loss training accuracy assets training baseline titanet ce train loss png assets training baseline titanet ce train accuracy png validation loss validation accuracy assets training baseline titanet ce val loss png assets training baseline titanet ce val accuracy png titanet ce vs titanet arcface this experiment compares training and validation loss and accuracy of two titanet models model size s trained with cross entropy and arcface loss the arcface parameters scale and margin are the ones specified in the original paper 30 and 0 2 as we can see metrics are quite similar and no major differences can be observed training loss training accuracy assets training titanet ce arc train loss png assets training titanet ce arc train accuracy png validation loss validation accuracy assets training titanet ce arc val loss png assets training titanet ce arc val accuracy png visualizations this section shows some visual results obtained after training each embedding model for around 75 epochs please note that all figures represent the same set of utterances even though different figures use different colours for the same speaker baseline vs titanet on librispeech this test compares the baseline and titanet models on the librispeech dataset used for training both models were trained with cross entropy loss and 2d projections were performed with umap as we can see the good training and validation metrics of the baseline model are not mirrored in this empirical test instead titanet is able to form compact clusters of utterances thus reflecting the high performance metrics obtained during training baseline titanet assets visualization ls baseline ce umap png assets visualization ls titanet ce umap png baseline vs titanet on vctk this test compares the baseline and titanet models on the vctk dataset unseen during training both models were trained with cross entropy loss and 2d projections were performed with umap as above titanet beats the baseline model by a large margin baseline titanet assets visualization vctk baseline ce umap png assets visualization vctk titanet ce umap png svd vs umap reduction this test compares two 2d reduction methods namely svd and umap both figures rely on the titanet model trained with cross entropy loss as we can see the choice of the reduction method highly influences our subjective evaluation with umap giving much better separation in the latent space svd umap assets visualization ls titanet ce svd png assets visualization ls titanet ce umap png cross entropy vs arcface loss this test compares two titanet models one trained with cross entropy loss and the other one trained with arcface loss both figures rely on umap as their 2d reduction method as we can see there doesn t seem to be a winner in this example as both models are able to obtain good clustering properties cross entropy arcface assets visualization ls titanet ce umap png assets visualization ls titanet arc umap png | titanet nvidia speaker-recognition speaker-verification speaker-identification speaker-embeddings d-vectors ml4cv unibo | ai |
Large_Language_Model_Hub | large language model hub papers tutorials code for large language models table of contents 1 key language models key language models 2 llm surveys llm surveys 3 training and optimization training and optimization 4 evaluation and benckmarks evaluation and benckmarks 5 qualitative evaluation qualitative evaluation 6 hallucination hallucination 7 prompt tuning prompt tuning 8 chatgpt gpt 4 chatgpt gpt 4 9 augmented llm augmented llm 10 retrieval base nlp retrieval base nlp 11 clinical applications clinical applications 12 knowledge distillnation knowledge distillation 13 machine translation machine translation 14 open source data open source data 15 safety safety 16 learning resources learning resources 17 analysis and inspection analysis and inspection 18 discussions discussions key language models a comprehensive survey on pretrained foundation models a history from bert to chatgpt https arxiv org pdf 2302 09419 pdf a comprehensive survey of ai generated content aigc a history of generative ai from gan to chatgpt https arxiv org abs 2303 04226 t5 exploring the limits of transfer learning with a unified text to text transformer https arxiv org abs 1910 10683 flan t5 https huggingface co docs transformers model doc flan t5 gpt3 language models are few shot learners https arxiv org abs 2005 14165 stanford webinar gpt 3 beyond https www youtube com watch v lnhhwrcdgk slides https docs google com presentation d 1wpyaleevjji dozjudevoypl y0yui1kws0vfbnba4 edit slide id g1c79e641885 1 554 llama open and efficient foundation language models https arxiv org abs 2302 13971 vedio with paper explained https www youtube com watch v e5onoyf2oak llama adapter efficient fine tuning of llama https github com zrrskywalker llama adapter palm scaling language modeling with pathways https arxiv org abs 2204 02311 pathways language model and model scaling aakanksha chowdhery stanford mlsys 69 https www youtube com watch v cv ebvwzoaw flan finetuned language models are zero shot learners https arxiv org abs 2109 01652 flan palm scaling instruction finetuned language models https arxiv org abs 2210 11416 paper explained with related work video https www youtube com watch v qdwetwqyrey slides https samuelalbanie com files digest slides 2022 10 scaling instruction finetuned language models pdf primer searching for efficient transformers for language modeling https arxiv org abs 2109 08668 codegen2 lessons for training llms on programming and natural languages https arxiv org pdf 2305 02309 pdf unlimiformer long range transformers with unlimited length input https arxiv org abs 2305 01625 lamp when large language models meet personalization https arxiv org abs 2304 11406 llm surveys a survey of large language models https arxiv org abs 2303 18223 harnessing the power of llms in practice a survey on chatgpt and beyond https arxiv org abs 2304 13712 training and optimization training language models to follow instructions with human feedback instructgpt https arxiv org abs 2203 02155 explanation vedio how chatgpt is trained https www youtube com watch v vprsbzxzavo the large language model training playbook https github com huggingface large language model training playbook scaling expert language models with unsupervised domain discovery https arxiv org abs 2303 14177 summary of open source apis tools and services for llm https github com kasperjunge llm guide ul2 unifying language learning paradigms https arxiv org abs 2205 05131 glam efficient scaling of language models with mixture of experts https proceedings mlr press v162 du22c html state of the art parameter efficient fine tuning peft methods https github com huggingface peft tree main lora low rank adaptation of large language models https arxiv org abs 2106 09685 adaptive lora adaptive budget allocation for parameter efficient fine tuning https arxiv org abs 2303 10512 prefix tuning optimizing continuous prompts for generation https aclanthology org 2021 acl long 353 p tuning prompt tuning can be comparable to fine tuning across scales and tasks https aclanthology org 2022 acl short 8 prompt tuning the power of scale for parameter efficient prompt tuning https arxiv org abs 2104 08691 evaluation and benckmarks big bench beyond the imitation game benchmark https arxiv org abs 2206 04615 mmlu measuring massive multitask language understanding https arxiv org abs 2009 03300 tydi qa a benchmark for information seeking question answering in typologically diverse languages https arxiv org abs 2003 05002 language models are multilingual chain of thought reasoners https arxiv org abs 2210 03057 gpteval nlg evaluation using gpt 4 with better human alignment https arxiv org abs 2303 16634 open ai evals https github com openai evals qualitative evaluation emergent abilities of large language models https www jasonwei net blog emergence larger language models do in context learning differently https arxiv org abs 2303 03846 capabilities of gpt 4 on medical challenge problems https arxiv org abs 2303 13375 zero shot clinical entity recognition using chatgpt https arxiv org pdf 2303 16416v1 pdf chatgpt outperforms crowd workers for text annotation tasks https arxiv org abs 2303 15056 are emergent abilities of large language models a mirage https arxiv org pdf 2304 15004 pdf generative agents interactive simulacra of human behavior https arxiv org abs 2304 03442 hallucination survey of hallucination in natural language generation https arxiv org abs 2202 03629 the internal state of an llm knows when its lying https arxiv org abs 2304 13734 prompt tuning the art of asking chatgpt for high quality answers a complete guide to prompt engineering technique https www amazon com art asking chatgpt high quality answers dp b0bt2jb67y prompt engineering guide https github com dair ai prompt engineering guide 1 hour tutorial https www youtube com watch v doxuror57xs slides https github com dair ai prompt engineering guide blob main lecture prompt engineering lecture elvis pdf large language models are implicitly topic models explaining and finding good demonstrations for in context learning https arxiv org pdf 2301 11916 pdf autoprompt eliciting knowledge from language models with automatically generated prompts https arxiv org abs 2010 15980 prefix tuning optimizing continuous prompts for generation https arxiv org abs 2101 00190l chain of thought prompting elicits reasoning in large language models https arxiv org abs 2201 11903 large language models can self improve https arxiv org abs 2210 11610 self consistency improves chain of thought reasoning in language models https arxiv org abs 2203 11171 active prompting with chain of thought for large language models https arxiv org abs 2302 12246 code https github com shizhediao active prompt boosting theory of mind performance in large language models via prompting https arxiv org abs 2304 11490 chatgpt gpt 4 gpt 4 technical report https cdn openai com papers gpt 4 pdf sparks of artificial general intelligence early experiments with gpt 4 https arxiv org abs 2303 12712v1 talk by the first author https www youtube com watch v qbik7 jpb2c ab channel sebastienbubeck gpt 4 developer demo livestream https www youtube com watch v outcgtbnmuq ab channel openai hugginggpt solving ai tasks with chatgpt and its friends in huggingface https arxiv org abs 2303 17580 augmented llm augmented language models a survey https arxiv org abs 2302 07842 check your facts and try again improving large language models with external knowledge and automated feedback https arxiv org abs 2302 12813 toolformer language models can teach themselves to use tools https arxiv org abs 2302 04761 retrieval base nlp memorizing transformers https arxiv org abs 2203 08913 demonstrate search predict composing retrieval and language models for knowledge intensive nlp https arxiv org abs 2212 14024 chat gpt retrieval plugin https github com openai chatgpt retrieval plugin clinical applications open source diagnosis generator https glass health ai chatdoctor a medical chat model fine tuned on llama model using medical domain knowledge https arxiv org abs 2303 14070v1 med palm large language models encode clinical knowledge https arxiv org abs 2212 13138 clinical t5 large language models built using mimic clinical text https physionet org content clinical t5 1 0 0 large ai models in health informatics applications challenges and the future https arxiv org abs 2303 11568 performance of chatgpt on usmle potential for ai assisted medical education using large language models https www ncbi nlm nih gov pmc articles pmc9931230 knowledge distillnation distilling step by step outperforming larger language models with less training data and smaller model sizes https arxiv org abs 2305 02301 machine translation pseudo label training and model inertia in neural machine translation https urldefense com v3 https openreview net forum id exkhh12dtd9 k hz7m0vt54 mpbn2m9vgpvdlbdmyeweve8305fs 1d7hjvskejmo1vfux1r4zeeodculiubpfywp4 7i 57oxds7ycdnq evaluating robustness to input perturbations for neural machine translation https urldefense com v3 https aclanthology org 2020 acl main 755 k hz7m0vt54 mpbn2m9vgpvdlbdmyeweve8305fs 1d7hjvskejmo1vfux1r4zeeodculiubpfywp4 7i 57oxfrgmdqaw cocoa mt a dataset and benchmark for contrastive controlled mt with application to formality https urldefense com v3 https arxiv org abs 2205 04022 k hz7m0vt54 mpbn2m9vgpvdlbdmyeweve8305fs 1d7hjvskejmo1vfux1r4zeeodculiubpfywp4 7i 57oxdp5rrfdg mt geneval a counterfactual and contextual dataset for evaluating gender accuracy in machine translation https urldefense com v3 https arxiv org abs 2211 01355 k hz7m0vt54 mpbn2m9vgpvdlbdmyeweve8305fs 1d7hjvskejmo1vfux1r4zeeodculiubpfywp4 7i 57oxccto29iq how good are gpt models at machine translation a comprehensive evaluation https urldefense com v3 https arxiv org pdf 2302 09210 pdf k hz7m0vt54 mpbn2m9vgpvdlbdmyeweve8305fs 1d7hjvskejmo1vfux1r4zeeodculiubpfywp4 7i 57oxd36gwjeg large language models effectively leverage document level context for literary translation but critical errors persist https urldefense com v3 https arxiv org pdf 2304 03245 pdf k hz7m0vt54 mpbn2m9vgpvdlbdmyeweve8305fs 1d7hjvskejmo1vfux1r4zeeodculiubpfywp4 7i 57oxdcqkwfxq no language left behind scaling human centered machine translation https urldefense com v3 https arxiv org abs 2207 04672 k hz7m0vt54 mpbn2m9vgpvdlbdmyeweve8305fs 1d7hjvskejmo1vfux1r4zeeodculiubpfywp4 7i 57oxdp6yraba open source data large open source datasets redpajama data an open source recipe to reproduce llama training dataset https github com togethercomputer redpajama data several datasets trillions of tokens in comparison with llama databricks dolly 15k https huggingface co datasets databricks databricks dolly 15k instruction pairs 15k openassistant conversations dataset oasst1 https huggingface co datasets openassistant oasst1 10k conversation trees with human in the loop style annotations longform optimizing instruction tuning for long text generation with corpus extraction https github com akoksal longform instruction style safety nemo guardrails by nvidia https github com nvidia nemo guardrails tree main topics moderation fact checking and hallucination secure execution jailbreak etc a watermark for large language models https arxiv org pdf 2301 10226 pdf learning resources openai cookbook https github com openai openai cookbook reasoning in large language models https github com jeffhj lm reasoning a set of ai tools https github com meetpateltech ai infinity llm summaries and tutorials awesome llm awesome https github com hannibal046 awesome llm stanford cs324 large language models https stanford cs324 github io winter2022 princeton cos597g fall 2022 understanding large language models https www cs princeton edu courses archive fall22 cos597g princeton cos 597f embodied language understanding https sites google com princeton edu cos597f analysis and inspection memorization without overfitting analyzing the training dynamics of large language models https openreview net forum id u3veurr08mt scaling laws for neural language models https arxiv org abs 2001 08361 discussions yann lecun do large language models need sensory grounding for meaning and understanding https drive google com file d 1bu5bv3x5w65dwsmapkcsr0zvrmru nbi view full interview godfather of artificial intelligence talks impact and potential of ai https www youtube com watch v qporo378qry sam altman openai ceo on gpt 4 chatgpt and the future of ai lex fridman podcast 367 https www youtube com watch v l guz73e6fw whose opinions do language models reflect https arxiv org abs 2303 17548 the low rank simplicity bias in deep networks https arxiv org abs 2103 10427 | ai |
|
Embedded-System-Design | embedded system design the software project for the lecture embedded system design at heidelberg university in ss2014 | os |
|
suiron | suiron machine learning for rc cars prediction visualization green actual blue prediction https thumbs gfycat com darlingforkedacaciarat size restricted gif click the video below to see it in action image alt text http img youtube com vi tfwcyhdawf0 0 jpg https youtu be tfwcyhdawf0 machine learning car dependencies python 2 7 was chosen as it was supported by all the libraries used at the time sudo apt get update sudo apt get upgrade sudo apt get install python opencv python dev export tf binary url https storage googleapis com tensorflow linux cpu tensorflow 0 10 0 cp27 none linux x86 64 whl sudo pip install upgrade tf binary url sudo pip install r requirements txt collecting data python collect py visualizing collected data python visualize collect py training data python train py visualizing predicted data python visualize predict py references blog post detailing how the hardware and software communicate communicating between rc car and the on board computer jabelone http jabelone com au blog make autonomous car code included communication between hardware and software repo car controller https github com jabelone car controller neural network architecture was based on nvidia s self driving car paper end to end learning for self driving cars https arxiv org pdf 1604 07316v1 pdf | ai |
|
ParkingLot | parking lot problem github license https img shields io github license vinitshahdeo parkinglot logo github https github com vinitshahdeo parkinglot blob master license github last commit https img shields io github last commit vinitshahdeo parkinglot logo github https github com vinitshahdeo parkinglot snyk vulnerabilities for github repo https img shields io snyk vulnerabilities github vinitshahdeo parkinglot logo snyk color red travis org https img shields io travis vinitshahdeo parkinglot logo travis https travis ci com vinitshahdeo parkinglot builds 139851721 about problem to design a parking lot system with ability to find registration numbers of all cars of a particular colour slot number in which a car with a given registration number is parked slot numbers of all slots where a car of a particular colour is parked parking lot assets logo png https github com vinitshahdeo parkinglot pre requisites github top language https img shields io github languages top vinitshahdeo parkinglot label nodejs logo node js https github com vinitshahdeo parkinglot github code size in bytes https img shields io github languages code size vinitshahdeo parkinglot logo github color teal https github com vinitshahdeo parkinglot codefactor grade https img shields io codefactor grade github vinitshahdeo parkinglot master logo codefactor logocolor white https github com vinitshahdeo parkinglot the source code for this project is written using node js https nodejs org make sure you have node js https nodejs org installed on your computer before running this application if not please install node js from here https nodejs org en download to check if you have node js and npm installed by running simple commands to see what version of each is installed test node js to see if node is installed type node v in terminal this should print the version number so you ll see something like this v10 16 0 test npm to see if npm is installed type npm v in terminal this should print the version number so you ll see something like this 6 9 0 note node installer https nodejs org en download installs both node js and npm on your system how to run this is a console application written in node js this can be run in two modes 1 interactive mode an interactive terminal based shell where commands can be typed in to perform different actions 2 file mode it accepts a filename as a parameter at the terminal and read the commands from that file quick start proceed to the steps below only if you ve node js installed if not please refer pre requisites pre requisites section for interactive mode open terminal and navigate cd to this folder and type the following commands bash 1 npm install 2 npm start for file mode open terminal and type node src index js data input txt terminal node src index js path to file txt note you can find a few sample input files inside data folder explained step 1 npm install or npm i will download all the dependencies defined in package json file and generate a node modules folder with the installed modules learn more here https docs npmjs com cli install step 2 npm start or npm run start will start the application it is equivalent to node src index js console application navigate to bin folder and open parking lot with double click it ll open a terminal where different commands list of user commands can be typed in you may face permission related issues please allow opening applications from unauthorized developers as it s blocked due to security reasons if you re using macos catalina you ll be prompted security warning as this binary is not notarized learn more about notarization here https developer apple com documentation xcode notarizing macos software before distribution if you re still facing issues please build the console application locally kindly refer build script build script section to build locally list of user commands users can interact with the parking lot system via a following simple set of commands which produce a specific output create parking lot create parking lot 6 will create a parking lot with 6 slots park registration number color park ka 01 hh 1234 white will allocate the nearest slot from entry gate leave leave 4 will make slot number 4 free status status will display cars and their slot details bash slot no registration no color 1 ka 01 hh 1234 white 2 ka 01 hh 9999 red 3 ka 01 bb 0001 white 5 ka 01 hh 2701 black 6 ka 01 hh 3141 black registration numbers for cars with colour color registration numbers for cars with colour white will display the registration number of the cars of white color e g ka 01 hh 1234 ka 01 bb 0001 slot numbers for cars with colour color slot numbers for cars with colour white will display slot numbers of the cars of white color e g 1 3 slot number for registration number registration number slot number for registration number mh 04 ay 1111 will display the slot number for the car with registration number mh 04 ay 1111 leave car by registration number leave car by registration number jh 01 lt 0008 will free the slot occupied by car with registration number jh 01 lt 0008 available slot numbers available slot numbers will display available slot numbers e g 2 6 8 allocated slot numbers allocated slot numbers will display occupied slot numbers e g 1 3 4 5 7 exit exit will quit the application and return to the console note any commands which are not mentioned above will throw an error input is an invalid command to view all the commands in terminal please run npm run help modules oops approach codefactor https www codefactor io repository github vinitshahdeo parkinglot badge https www codefactor io repository github vinitshahdeo parkinglot codacy badge https api codacy com project badge grade 275124e731de4f48a7adac2e9984e59f https www codacy com manual vinitshahdeo parkinglot utm source github com amp utm medium referral amp utm content vinitshahdeo parkinglot amp utm campaign badge grade there are two classes defined parkinglot it is the main class which is used to initialize a parking lot in each parking lot there is maximum number of slots and an array of slots that will be occupied by the car it has following methods createparkinglot input creates a parking lot with given input it throws an error minimum one slot is required to create parking slot if zero or negative number n 0 is provided as an input parkcar input allocates nearest slot from entry gate to the car it can throw following errors minimum one slot is required to create parking slot when parking lot is not initialized sorry parking lot is full when parking lot has reached its maximum capacity please provide registration number and color both when input contains either of two i e registration number and color of the car not both leavecar input removes car in given slot in parking lot it throws following errors sorry parking lot is empty if parking lot is empty slot number slot number is not found when slot number is absent slot number slot number is already free when slot number is not occupied leavecarbycarnumber input makes the slot free for car of given registration number getparkingstatus returns an array containing slot number registration number and color it throws an error sorry parking lot is empty if parking lot is empty getcarswithsamecolor input returns a comma separated string containing registration numbers of cars with same color e g ka 01 hh 1234 ka 01 hh 9999 ka 01 p 333 getslotswithsamecolorcar input returns a comma separated string containing slot numbers of car with same color e g 3 5 6 getslotbycarnumber input finds slot number of car for given registration number it returns not found when car is not present findnearestavailableslot finds nearest free slot findallavailableslots returns a comma separated string of free parking slots e g 1 4 7 it returns null if parking lot is not created findallallocatedslots returns a comma separated string of allocated parking slots e g 2 3 5 6 it returns null if parking lot is not created car new car number color constructor used to initialize a car object containing two fields registration number and color iscarequal checks whether two cars are equal or not note i ve made an assumption that the registration number for two cars can never be same test scripts tests are written using mocha https mochajs org and can be run using npm test npm run test unit run unit tests only tests for functions in parking class npm run test system run repository tests only see this system tests section npm run test lint run lint tests using eslint npm run test run all tests lint tests unit tests system tests unit tests unit tests are written for the methods of parkinglot class system tests system tests mainly include repository structure tests it tests for the following repository must contain package json readme md gitignore eslintrc npm folder src folder tests folder package json must have valid name author and license must have proper keywords must have valid version string must have scripts definitions must point to precise version for dependencies should not overlap dependencies must have devdependencies gitignore must contain build dist out node modules folders lint tests npm run test lint is used to run javascript lint tests it detects the coding style issues eslint rules are defined in eslintrc js file node modules eslint bin eslint js fix src can be run to fix lint errors code coverage to see code coverage report run npm run test the current code coverage for the tests are following type percentage statement 91 48 branch 69 57 function 89 53 lines 91 25 function coverage has each function or subroutine in the program been called statement coverage has each statement in the program been executed branch coverage has each branch also called dd path of each control structure such as in if and case statements been executed line coverage has each executable line in the source file been executed note code coverage is added to the mocha tests npm run test using nyc https www npmjs com package nyc you can see the code coverage report in terminal as well as detailed html report inside coverage folder go to coverage folder and open index html build script npm run build will build the executable console application inside bin folder which can be opened by double clicking on it make sure you ve already done with npm install if not please install dependencies first please refer this explained section for the same note pkg https www npmjs com package pkg is used to package the node js application into an executable learn more here https www npmjs com package pkg documentation writing code is easy but maintaining isn t one can read one s code but it s difficult for others to read with this spirit i ve added jsdoc https www npmjs com package jsdoc comments in code go to out folder and open global html you ll find the documentation for the source code there to generates the docs locally open terminal and run npm run create docs dependencies used dev dependencies https img shields io david dev vinitshahdeo parkinglot logo npm https github com vinitshahdeo parkinglot mocha https mochajs org a javascript test framework for node js programs learn more here https mochajs org chai https www chaijs com a bdd tdd assertion library for node js and it can be paired with any js testing framework learn more here https www chaijs com nyc https www npmjs com package nyc a js code coverage tool extensively tested with mocha for measuring code coverage learn more here https istanbul js org docs tutorials mocha chalk https www npmjs com package chalk a npm module used to style terminal string learn more here https www npmjs com package chalk eslint https eslint org a static code analysis tool for identifying problematic patterns found in javascript code it covers both code quality and coding style issues learn more here https eslint org pkg https www npmjs com package pkg it is used to package a node js project into an executable that can be run even on devices without node js installed learn more here https www npmjs com package pkg jsdoc https www npmjs com package jsdoc an open source api documentation generator for javascript it allows developers to document their code through comments it is supported only for node js versions v8 15 0 learn more here https devdocs io jsdoc screenshots please go to screenshots folder to find screenshots of running parking lot console application click here https drive google com file d 1 gbto9anz8fyyd4bjlb0rsm7aqwuaevk view usp sharing to view e2e working demo video tl dr here s the cheat sheet for you open terminal and type the following 1 cd parking lot navigates to the parking lot root folder 2 npm install installs all the dependencies 3 npm run start starts the console application in interactive mode 4 npm run test runs all the tests 5 npm run test unit runs all the unit tests 6 npm run test system runs system tests 7 npm run test lint runs lint test 8 npm run build builds the application in bin directory 9 npm run create docs creates documentation inside out folder 10 npm run help displays all supported user commands 11 node src index js data input txt runs the application in file mode need help twitter url https img shields io twitter url label tweet 20about 20this 20 e2 9d a4 ef b8 8f logo twitter url https 3a 2f 2fgithub com 2fvinitshahdeo 2fparkinglot github stars https img shields io github stars vinitshahdeo parkinglot label star 20on 20github logo github style social https github com vinitshahdeo parkinglot stargazers feel free to reach out to me via email shoot your doubts at vinitshahdeo gmail com mailto vinitshahdeo gmail com subject parkinglot glad to see you here show some by starring this https github com vinitshahdeo parkinglot repository author https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot images 0 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot links 0 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot images 1 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot links 1 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot images 2 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot links 2 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot images 3 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot links 3 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot images 4 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot links 4 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot images 5 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot links 5 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot images 6 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot links 6 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot images 7 https sourcerer io fame vinitshahdeo vinitshahdeo parkinglot links 7 vinit shahdeo https github com vinitshahdeo twitter badge https img shields io twitter follow vinit shahdeo svg style social https twitter com vinit shahdeo github followers https img shields io github followers vinitshahdeo svg label follow 20 vinitshahdeo style social https github com vinitshahdeo javascript if isawesome thanks in advance p starthisrepository javascript v netflix https forthebadge com images badges powered by netflix svg https github com vinitshahdeo smile https forthebadge com images badges makes people smile svg https github com vinitshahdeo built with love https forthebadge com images badges built with love svg https github com vinitshahdeo | parking-lot nodejs javascript oops tdd system-design test-driven-development object-oriented-programming | os |
A1-star-Galaxy- | a1 star galaxy information technology | server |
|
chess-low-level-system-design | chess low level system design build status https travis ci org anomaly2104 chess low level system design svg branch master video explanation https youtu be rvhncng0of0 https youtu be rvhncng0of0 problem statements problem statement problem statement md further enhancements implement checkmate feature write more unit tests support special move of pawn where it can go diagonal when it kills at many places we are evaluating conditions like or operation we are allowed to do something if any condition out of given conditions fulfill and operation we are allowed to do something if all conditions fulfill try to improve the design for this add history of moves for each player add support for casteling move can we remove putting currentcell in piece how about introducing something like position a piece will have a position and you can always get the cell back from board using this position | chess system-design lld design-principles design-patterns oops oops-in-java object-oriented-programming low-level-design low-level-design-problems design-pattern design-patterns-java interview interview-questions | os |
ITF_NOTES | itf notes there are notes examples etc about information technologies in this repo susta | server |
|
GCP-Data-Engineering | gcp data engineering notes taken and exercises done on the data engineering on google cloud platform specialization icon attachments gcp data engineering png data engineering on google cloud platform specialization by cloudera duration five weeks content 5 course of 1 week each 1 google cloud platform big data and machine learning fundamentals introduction to the big data and machine learning capabilities of google cloud platform gcp 2 leveraging unstructured data with cloud dataproc on google cloud platform create and manage computing clusters to run hadoop spark pig and or hive jobs on google cloud platform access various cloud storage options from their compute clusters and integrate google s machine learning capabilities into their analytics programs 3 serverless data analysis with google bigquery and cloud dataflow carry out no ops data warehousing analysis and pipeline processing 4 serverless machine learning with tensorflow on google cloud platform machine learning ml and tensorflow concepts 5 building resilient streaming systems on google cloud platform streaming data pipelines using google cloud pub sub and dataflow to enable real time decision making | gcp | cloud |
chemnlp | name https colab research google com assets colab badge svg https colab research google com github knc6 jarvis tools notebooks blob master jarvis tools notebooks chemnlp example ipynb alt text https github com usnistgov chemnlp actions workflows main yml badge svg doi https zenodo org badge 523320947 svg https zenodo org badge latestdoi 523320947 chemnlp table of contents introduction intro installation install examples example web app webapp reference reference a name intro a introduction chemnlp is a software package to process chemical information from the scientific literature p align center img src https github com usnistgov chemnlp blob develop chemnlp schemcatic png alt chemnlp width 600 p a name install a installation first create a conda environment install miniconda environment from https conda io miniconda html based on your system requirements you ll get a file something like miniconda3 latest xyz now bash miniconda3 latest linux x86 64 sh for linux bash miniconda3 latest macosx x86 64 sh for mac download 32 64 bit python 3 8 miniconda exe and install for windows now let s make a conda environment say chemnlp choose other name as you like conda create name chemnlp python 3 9 source activate chemnlp method 1 using setup py now let s install the package git clone https github com usnistgov chemnlp git cd chemnlp python setup py develop cde data download method 2 using pypi as an alternate method chemnlp can also be installed using pip command as follows pip install chemnlp cde data download a name example a examples parse chemical formula run chemnlp py file path chemnlp tests xyz text classification example python chemnlp classification scikit class py csv path chemnlp sample data cond mat small csv google colab example for installation and text classification https colab research google com github knc6 jarvis tools notebooks blob master jarvis tools notebooks chemnlp example ipynb text generation example google colab example for text generation with huggingface https colab research google com github knc6 jarvis tools notebooks blob master jarvis tools notebooks chemnlp titletoabstract ipynb a name webapp a using the webapp the webapp is available at https jarvis nist gov jarvischemnlp jarvis chemnlp https github com usnistgov chemnlp blob develop chemnlp ptable png a name reference a reference chemnlp a natural language processing based library for materials chemistry text data https arxiv org abs 2209 08203 | natural-language-processing python nist-jarvis ai llm transformers | ai |
iotdb | licensed to the apache software foundation asf under one or more contributor license agreements see the notice file distributed with this work for additional information regarding copyright ownership the asf licenses this file to you under the apache license version 2 0 the license you may not use this file except in compliance with the license you may obtain a copy of the license at http www apache org licenses license 2 0 unless required by applicable law or agreed to in writing software distributed under the license is distributed on an as is basis without warranties or conditions of any kind either express or implied see the license for the specific language governing permissions and limitations under the license english readme md readme zh md iotdb unit test https github com apache iotdb actions workflows unit test yml badge svg https github com apache iotdb actions workflows unit test yml codecov https codecov io github apache iotdb graph badge svg token ejf3ugk0nv https codecov io github apache iotdb github release https img shields io github release apache iotdb svg https github com apache iotdb releases license https img shields io badge license apache 202 4eb1ba svg https www apache org licenses license 2 0 html https github size badge herokuapp com apache iotdb svg https img shields io github downloads apache iotdb total svg https img shields io badge platform win 20 7c 20macos 20 7c 20linux yellow svg https img shields io badge java language 1 8 20 7c 2011 20 7c 2017 blue svg iotdb website https img shields io website up down green red https shields io svg label iotdb website https iotdb apache org maven version https maven badges herokuapp com maven central org apache iotdb iotdb parent badge svg http search maven org search gav 1 g org apache iotdb gitpod ready to code https img shields io badge gitpod ready to code blue logo gitpod https gitpod io https github com apache iotdb slack status https img shields io badge slack join chat white svg logo slack style social https join slack com t apacheiotdb shared invite zt qvso1nj8 7715tpysztzqmyg5qxqwpg overview iotdb internet of things database is a data management system for time series data which provides users with specific services including data collection storage and analysis due to its light weight structure high performance and usable features together with its seamless integration with the hadoop and spark ecology iotdb meets the requirements of massive dataset storage high throughput data input and complex data analysis in the industrial iot field main features main features of iotdb are as follows 1 flexible deployment strategy iotdb provides users a one click installation tool on either the cloud platform or the terminal devices and a data synchronization tool bridging the data on cloud platform and terminals 2 low cost on hardware iotdb can reach a high compression ratio of disk storage 3 efficient directory structure iotdb supports efficient organization for complex time series data structures from intelligent networking devices organization for time series data from devices of the same type and fuzzy searching strategy for massive and complex directory of time series data 4 high throughput read and write iotdb supports millions of low power devices strong connection data access high speed data read and write for intelligent networking devices and mixed devices mentioned above 5 rich query semantics iotdb supports time alignment for time series data across devices and measurements computation in time series field frequency domain transformation and rich aggregation function support in time dimension 6 easy to get started iotdb supports sql like language jdbc standard api and import export tools which is easy to use 7 seamless integration with state of the practice open source ecosystem iotdb supports analysis ecosystems such as hadoop spark and visualization tool such as grafana for the latest information about iotdb please visit iotdb official website https iotdb apache org if you encounter any problems or identify any bugs while using iotdb please report an issue in jira https issues apache org jira projects iotdb issues toc outline iotdb iotdb overview overview main features main features outline outline quick start quick start prerequisites prerequisites installation installation build from source build from source configurations configurations start start start iotdb start iotdb use iotdb use iotdb use cli use cli basic commands for iotdb basic commands for iotdb stop iotdb stop iotdb only build server only build server only build cli only build cli usage of csv import and export tool usage of csv import and export tool toc quick start this short guide will walk you through the basic process of using iotdb for a more detailed introduction please visit our website s user guide https iotdb apache org userguide master quickstart quickstart html prerequisites to use iotdb you need to have 1 java 1 8 1 8 11 to 17 are verified please make sure the environment path has been set accordingly 2 maven 3 6 if you want to compile and install iotdb from source code 3 set the max open files num as 65535 to avoid too many open files error 4 optional set the somaxconn as 65535 to avoid connection reset error when the system is under high load linux sudo sysctl w net core somaxconn 65535 freebsd or darwin sudo sysctl w kern ipc somaxconn 65535 linux this guide is based on an installation of ubuntu 22 04 git make sure git is installed if it s missing simply install it via sudo apt install git java make sure java is installed if it s missing simply install it via sudo apt install default jdk flex sudo apt install flex bison sudo apt install bison boost sudo apt install libboost all dev openssl header files usually openssl is already installed however it s missing the header files we need to compile so ensure these are installed sudo apt install libssl dev mac os git first ensure git works usually on a new mac as soon as you simply type git in a terminal window a popup will come and ask if you want to finish installing the mac developer tools just say yes as soon as this is finished you are free to use git homebrew then install homebrew if this hasn t been installed yet as we are going to be installing everything using homebrew bin bash c curl fssl https raw githubusercontent com homebrew install head install sh java as soon as that s done install java if this hasn t been installed yet brew install java depending on your version of homebrew it will tell you to do one of the following depending on the type of processor in your device mainly on the intel based models sudo ln sfn usr local opt openjdk libexec openjdk jdk library java javavirtualmachines openjdk jdk mainly on the arm based models sudo ln sfn opt homebrew opt openjdk libexec openjdk jdk library java javavirtualmachines openjdk jdk cpp prerequisites building thrift requires us to add two more dependencies to the picture this however is only needed when enabling the compile cpp profile brew install boost brew install bison brew install openssl windows chocolatey then install chocolatey if this hasn t been installed yet as we are going to be installing everything using chocolatey https chocolatey org install git choco install git install java choco install openjdk visual studio 19 2022 choco install visualstudio2022community choco install visualstudio2022buildtools choco install visualstudio2022 workload nativedesktop flex bison choco install winflexbison boost choco install boost msvc 14 2 openssl choco install openssl installation iotdb provides three installation methods you can refer to the following suggestions choose the one fits you best installation from source code if you need to modify the code yourself you can use this method installation from binary files download the binary files from the official website this is the recommended method in which you will get a binary released package which is out of the box using docker the path to the dockerfile is here https github com apache iotdb tree master docker src main here in the quick start we give a brief introduction of using source code to install iotdb for further information please refer to user guide https iotdb apache org userguide master quickstart quickstart html build from source prepare thrift compiler skip this chapter if you are using windows as we use thrift for our rpc module communication and protocol definition we involve thrift during the compilation so thrift compiler 0 13 0 or higher is required to generate thrift java code thrift officially provides binary compiler for windows but unfortunately they do not provide that for unix oss if you have permission to install new softwares use apt install or yum install or brew install to install the thrift compiler if you already have installed the thrift compiler skip this step then you may add the following parameter when running maven dthrift download url http apache org licenses license 2 0 txt dthrift exec absolute path your local thrift binary file if not then you have to compile the thrift compiler and it requires you install a boost library first therefore we compiled a unix compiler ourselves and put it onto github and with the help of a maven plugin it will be downloaded automatically during compilation this compiler works fine with gcc8 or later ubuntu macos and centos but previous versions and other oss are not guaranteed if you can not download the thrift compiler automatically because of network problem you can download it yourself and then either rename your thrift file to project root thrift target tools thrift 0 12 0 0 13 0 linux exe or add maven commands dthrift download url http apache org licenses license 2 0 txt dthrift exec absolute path your local thrift binary file compile iotdb you can download the source code from git clone https github com apache iotdb git the default dev branch is the master branch if you want to use a released version x x x git checkout vx x x or checkout to the branch of a big version e g the branch of 1 0 is rel 1 0 git checkout rel x x build iotdb from source under the root path of iotdb mvn clean package pl distribution am dskiptests after being built the iotdb distribution is located at the folder distribution target only build cli under the root path of iotdb mvn clean package pl cli am dskiptests after being built the iotdb cli is located at the folder cli target build others using p compile cpp for compiling cpp client for more details read client cpp s readme file note directories thrift target generated sources thrift thrift sync target generated sources thrift thrift cluster target generated sources thrift thrift influxdb target generated sources thrift and antlr target generated sources antlr4 need to be added to sources roots to avoid compilation errors in the ide in idea you just need to right click on the root project name and choose maven reload project after you run mvn package successfully configurations configuration files are under conf folder environment config module datanode env bat datanode env sh system config module iotdb datanode properties log config module logback xml for more information please see config manual https iotdb apache org userguide master reference datanode config manual html start you can go through the following steps to test the installation if there is no error returned after execution the installation is completed start iotdb users can start 1c1d iotdb by the start standalone script under the sbin folder unix os x sbin start standalone sh windows sbin start standalone bat use iotdb use cli iotdb offers different ways to interact with server here we introduce the basic steps of using cli tool to insert and query data after installing iotdb there is a default user root its default password is also root users can use this default user to login cli to use iotdb the startup script of cli is the start cli script in the folder sbin when executing the script user should assign ip port user name and password the default parameters are h 127 0 0 1 p 6667 u root pw root here is the command for starting the cli unix os x sbin start cli sh h 127 0 0 1 p 6667 u root pw root windows sbin start cli bat h 127 0 0 1 p 6667 u root pw root the command line cli is interactive so you should see the welcome logo and statements if everything is ready version x x x iotdb login successfully iotdb basic commands for iotdb now let us introduce the way of creating timeseries inserting data and querying data the data in iotdb is organized as timeseries each timeseries includes multiple data time pairs and is owned by a database before defining a timeseries we should define a database using create database first and here is an example iotdb create database root ln we can also use show databases to check the database being created iotdb show databases database root ln total line number 1 after the database is set we can use create timeseries to create a new timeseries when creating a timeseries we should define its data type and the encoding scheme here we create two timeseries iotdb create timeseries root ln wf01 wt01 status with datatype boolean encoding plain iotdb create timeseries root ln wf01 wt01 temperature with datatype float encoding rle in order to query the specific timeseries we can use show timeseries path path represent the location of the timeseries the default value is null which queries all the timeseries in the system the same as using show timeseries root here are some examples 1 querying all timeseries in the system iotdb show timeseries timeseries alias database datatype encoding compression tags attributes root ln wf01 wt01 temperature null root ln float rle snappy null null root ln wf01 wt01 status null root ln boolean plain snappy null null total line number 2 2 querying a specific timeseries root ln wf01 wt01 status iotdb show timeseries root ln wf01 wt01 status timeseries alias database datatype encoding compression tags attributes root ln wf01 wt01 status null root ln boolean plain snappy null null total line number 1 insert timeseries data is a basic operation of iotdb you can use insert command to finish this before insertion you should assign the timestamp and the suffix path name iotdb insert into root ln wf01 wt01 timestamp status values 100 true iotdb insert into root ln wf01 wt01 timestamp status temperature values 200 false 20 71 the data that you have just inserted will display as follows iotdb select status from root ln wf01 wt01 time root ln wf01 wt01 status 1970 01 01t00 00 00 100z true 1970 01 01t00 00 00 200z false total line number 2 you can also query several timeseries data using one sql statement iotdb select from root ln wf01 wt01 time root ln wf01 wt01 temperature root ln wf01 wt01 status 1970 01 01t00 00 00 100z null true 1970 01 01t00 00 00 200z 20 71 false total line number 2 to change the time zone in cli you can use the following sql iotdb set time zone 08 00 time zone has set to 08 00 iotdb show time zone current time zone asia shanghai add then the query result will show using the new time zone iotdb select from root ln wf01 wt01 time root ln wf01 wt01 temperature root ln wf01 wt01 status 1970 01 01t08 00 00 100 08 00 null true 1970 01 01t08 00 00 200 08 00 20 71 false total line number 2 the commands to exit the cli are iotdb quit or iotdb exit for more information about the commands supported by iotdb sql please see user guide https iotdb apache org userguide master quickstart quickstart html stop iotdb the server can be stopped with ctrl c or the following script unix os x sbin stop standalone sh windows sbin stop standalone bat usage of csv import and export tool see usage of csv import and export tool https iotdb apache org userguide master maintenance tools csv tool html frequent questions for compiling see frequent questions when compiling the source code https iotdb apache org development contributeguide html frequent questions when compiling the source code contact us qq group apache iotdb user group 659990460 wechat group add friend tietouqiao or liutaohua001 and then we ll invite you to the group slack slack channel https join slack com t apacheiotdb shared invite zt qvso1nj8 7715tpysztzqmyg5qxqwpg see join the community https github com apache iotdb issues 1995 for more | timeseries database iot nosql big-data java tsdb | server |
hand_finger_recognition_android | hand finger recognition android this algorithm uses a convex hull with color segmentation in the vhi color space to detect a hand and how many fingers the person has extended as seen on this example video https www youtube com watch v kugpoxocpds dependencies android opencv | ai |
|
ransomwaredetection_v2 | ransomware detection ransomware detection detects ransomware in virtual machines this program is designed to be installed on a hypervisor to monitor cluster of vm s poster team poster jpg features installation prequisites you must have python 3 8 installed requirements pip3 install r requirements txt usage demo resources https csspp soe ucsc edu 2021nutanix add video here maybe host on youtube technologies used written only in python team this project was done in conjuction with nutanix and was our senior capstone project at uc santa cruz cyrus karsan https cyruskarsan github io scott fischer raphael zaafrani | cloud |
|
meg | meg cross platform mobile application development framework installation 1 install ruby 2 run gem install bundler 3 run export path path gem ruby 2 3 0 bin 4 run bundle install 5 run bin meg usage examples creating a new restful server bin meg new myserver t sinatra server creating two restful server plugins bin meg generate plugin conference t sinatra service plugin a myserver acronym string name string city string country string venue string start date datetime end date datetime bin meg generate plugin speaker t sinatra service plugin a myserver name string affiliation string shortbio string running the server cd myserver bundle install rake db migrate sqlite3 db development sqlite3 populate with some data insert into conferences values 1 qtcon br qtcon brasil s o paulo brasil espaco fit 2017 08 18 09 00 00 2017 08 20 18 00 00 insert into conferences values 2 akademy akademy berlin germany bcc 2017 03 01 09 00 00 2017 03 03 18 00 00 insert into conferences values 3 conf kde in conf kde in guwahati india iit 2017 03 10 09 00 00 2017 03 12 18 00 00 insert into speakers values 1 our beloved konqi kde konqi is awesome insert into speakers values 2 dirk gently adams he is a holistic detective run the server ruby myserver rb creating a new qt restful client bin meg new myapp t restful app creating two restful client plugins bin meg generate plugin conferences t restful client plugin a myapp i name c university acronym string name string city string venue string start date datetime end date datetime bin meg generate plugin speakers t restful client plugin a myapp i name c microphone name string affiliation string shortbio string build and run your qt mobile application cd myapp qmake myapp pro make myapp | front_end |
|
storyblok-design-system | storyblok s design system this design system is an open source collection of components that are used in app storyblok com and is continiously developed to improve storyblok demo you can see the design system live under https next blok ink compatibility the storyblok design system package is compatible with vue 3 only for vue 2 please use the storyblok design system package getting started to install the design system in your project you need to install the package first sh npm install storyblok design system save yarn add storyblok design system then you need to install and use the design system in your vue project js import blokink from storyblok design system import storyblok design system dist storyblok design system css app use blokink vue 3 then you can use all blok ink components everywhere in your app vue template sbicon name search template only install specific components you can also only install a few components by specifying the option withcomponents js import blokink from storyblok design system import storyblok design system dist storyblok design system css app use blokink withcomponents sbbutton sbicon for more information on the usage of the design system go to https www storyblok com docs guide in depth design system https www storyblok com docs guide in depth design system development to develop within the design system you can use storybook that has all components setup start execute storybook sh yarn or npm install yarn storybook compiles and minifies for production sh yarn build run your unit tests sh yarn test unit lints and fixes files sh yarn lint p align center h5 align center powered by a href https www storyblok com title link to the storyblok website storyblok a h5 p | design-system storyblok vue product storyblok-api-squad | os |
CPPWebFramework | github issues https img shields io github issues heriklyma cppwebframework svg https github com heriklyma cppwebframework issues travis ci https travis ci org heriklyma cppwebframework svg branch master https travis ci org heriklyma cppwebframework build status https ci appveyor com api projects status d8u7th2wl1qro6m2 svg true https ci appveyor com project heriklyma cppwebframework codacy badge https api codacy com project badge grade 8b818182369744f0af42a52785f7b5fe https www codacy com app heriklyma cppwebframework utm source github com amp utm medium referral amp utm content heriklyma cppwebframework amp utm campaign badge grade language c https img shields io badge powered by c green svg style flat square https isocpp org license https img shields io github license mashape apistatus svg https github com heriklyma cppwebframework blob master license txt c web framework cwf the c web framework cwf is a mvc web framework open source under a href https github com heriklyma cppwebframework blob master license txt mit license a using c with qt to be used in the development of web applications the cwf was designed to consume few computational resources such as memory and processing and have a low response time for requests with mvc model view controller architecture where you can create classes to take care of the business layer model use cstl c server pages standard tag library within the web pages to take care of data presentation view and use the controllers as a between the two layers controller the cwf had inspirations in java servlets jstl and spring framework because it is created in qt the c web framework can run on the same platforms supported by qt ul li b desktop b linux os x windows li li b embedded and rtos b linux qnx vxworks windows li li b mobile b android ios windows li ul the cwf has only one configuration file called cppweb ini and a policy of using only c and qt in the development of its components in order to avoid the installation of numerous libraries and conflicts maintain multiplatform characteristics facilitate installation and keep the learning curve low in order to make web development as simple as possible even for beginners hr b hello world example b br br cpp include cppwebapplication h class helloworldcontroller public cwf controller public void doget cwf request request cwf response response const override response write html body hello world body html call http localhost 8080 hello int main int argc char argv cwf cppwebapplication server argc argv path to example server server addcontroller helloworldcontroller hello return server start hr b mvc model view controller example b br br cpp hellomodel h model include qobject class hellomodel public qobject q object public slots qstring greeting const return hello user helloview view view html head title hello title head body out value model greeting body html hellocontroller h controller include cwf controller h include model hellomodel h class hellocontroller public cwf controller public void doget cwf request request cwf response response const override hellomodel model request addattribute model model request getrequestdispatcher pages helloview view forward request response main cpp include cwf cppwebapplication h include controller hellocontroller h call http localhost 8080 hello int main int argc char argv cwf cppwebapplication server argc argv path to example server server addcontroller hellocontroller hello return server start hr b rest web service example b br br cpp include cwf sqlquery h include cwf cppwebapplication h include cwf sqldatabasestorage h sql script create table countries co id serial primary key co name varchar unique insert into countries co name values brazil united states of america canada cwf sqldatabasestorage storage qpsql localhost postgres postgres 1234 5432 class countriescontroller public cwf controller public void doget cwf request request cwf response response const override cwf sqlquery qry storage qry exec select from countries response write qry tojson call http localhost 8080 countries int main int argc char argv cwf cppwebapplication server argc argv path to example server server addcontroller countriescontroller countries return server start hr b orm object relational mapper experimental example b br br cpp include usermodel h include cwf cppwebapplication h include cwf sqldatabasestorage h orm experimental tested only on postgresql cwf sqldatabasestorage conexao qpsql localhost postgres postgres 1234 5432 class ormcontroller public cwf controller public void doget cwf request request cwf response response const override usermodel user conexao user setname herik lima user setphone 55 11 9 99999 0000 user setcountry brazil user setstate s o paulo response write qbytearray html body user save saved error body html call http localhost 8080 orm int main int argc char argv cwf cppwebapplication server argc argv home herik cppwebframework examples orm server usermodel conexao updatedb create or update the table in database server addcontroller ormcontroller orm return server start usermodel h ifndef usermodel h define usermodel h include cwf model h class usermodel public cwf model q object q property qstring name read getname write setname q property qstring phone read getphone write setphone q property qstring country read getcountry write setcountry q property qstring state read getstate write setstate qstring name qstring phone qstring country qstring state public explicit usermodel cwf sqldatabasestorage connection cwf model connection usuario public slots qstring getname const return name void setname const qstring value name value qstring getphone const return phone void setphone const qstring value phone value qstring getcountry const return country void setcountry const qstring value country value qstring getstate const return state void setstate const qstring value state value endif usermodel h br hr b installation b br ol li download and install qt 5 9 or higher https www qt io download open source li li open the terminal li li install qt libraries sudo apt get install qt5 default linux li li make a project clone git clone https github com heriklyma cppwebframework git li li cd cppwebframework cppwebframework li li qmake cppwebframework pro li li make li li make install use sudo on linux li ol hr b jemalloc optional installation recommended b br ol li install jemalloc sudo apt get install libjemalloc dev linux li li enable jemalloc in the pro file libs ljemalloc li ol hr b steps to test the c web framework s examples b br ol li open a pro file from an example using qt creator li li change the path in the main cpp file cwf cppwebapplication a argc argv path to example server li li run the project li li open your browser and type http localhost 8080 to check if the server is online li ol hr b steps to test the c web framework s helloworlddocker example with docker containers b br ol li install docker li li sudo docker run d p 80 80 imacellone cwf helloworld 1 0 li li open your browser and type http localhost to check if the server is online li li if you want to test your own examples please follow the steps demonstrated on the cppwebframework examples helloworld dockerfile file build and run the image li ol hr b cppwebframework mailing list b https groups google com forum forum cppwebframework br b videos b https www youtube com channel ucf jt44a1k pq6z mhn2gyq | cpp web webapp framework c cppwebframework qt server servlet http http-server webservice webserver rest json xhtml xml cwf mvc model-view-controller | front_end |
system-design-and-architecture | h1 align center system design and architecture h1 the 2nd edition is still a work in progress the book system design and architecture has helped millions of software engineers worldwide to succeed in the internet industry since 2015 here is why it works 1 real world engineering it comes from real world examples of fanng and many other silicon valley companies and it outlines how to build real world internet products and services 2 easy to digest system design at the right level of abstraction is like a map to route you to your destination with the shortest cut there are charts diagrams and step by step guides all for you to acquire the minimum actionable knowledge to excel system design interviews and get started building 3 full coverage it strives to be the book for you to master most of the system design use cases from backend to frontend and from zero to hero 4 4 step framework this book approaches and solve problems in a systematic and repeatable way 1 clarify requirements 2 sketch out the high level design 3 discuss individual components and how they interact with each other 4 wrap up with blind spots or bottlenecks what s different in the 2nd edition from 2015 to 2022 we saw mobile ate the world cloud native computing came across kubernetes and web3 went through ups and downs there are always new companies at different stages of their lifecycles taking the lead in the internet industry i am interested in how they work aren t you so in the 2nd edition i will add more interesting content with new companies and products rewrite existing content with new trends in the industry add more charts and diagrams with step by step guides add a pdf edition of the book deduplicate repetitive content so that each design takes its unique abstraction what is out of this book s scope api design for specific domains please go to google s api design guide https cloud google com apis design object oriented design its importance is quite overestimated by mediocre engineers how to use this book for professionals google l5 or above go directly to system design in practice for junior and intermediate programmers google l3 l4 go to system design theories and then read system design in practice for beginners go to prepare for an interview effectively then read system design theories and finally go to system design in practice system design in practice product question img src https res cloudinary com dohtidfqh image upload v1580708936 web guiguio instagram png width 52 designing instagram or pinterest en 2016 02 13 crack the system design interview md img src https res cloudinary com dohtidfqh image upload v1580708917 web guiguio uber png width 52 designing uber en 120 designing uber md img src https res cloudinary com dohtidfqh image upload v1580709369 web guiguio facebook png width 52 how facebook scale its social graph store tao en 49 facebook tao md img src https res cloudinary com dohtidfqh image upload v1580709414 web guiguio netflix png width 52 how netflix serves viewing data en 45 how to design netflix view state service md img src https res cloudinary com dohtidfqh image upload v1580709444 web guiguio stripe png width 52 how to design robust and predictable apis with idempotency en 43 how to design robust and predictable apis with idempotency md img src https res cloudinary com dohtidfqh image upload v1580709414 web guiguio netflix png width 52 how to stream video over http for mobile devices http live streaming hls en 38 how to stream video over http md img src https res cloudinary com dohtidfqh image upload v1580709618 web guiguio confluent png width 52 designing a distributed logging system en 61 what is apache kafka md img src https res cloudinary com dohtidfqh image upload v1580709677 web guiguio twitter png width 52 designing a url shortener en 84 designing a url shortener md img src https res cloudinary com dohtidfqh image upload v1580709990 web guiguio linkedin png width 52 designing a kv store with external storage en 97 designing a kv store with external storage md img src https res cloudinary com dohtidfqh image upload v1580709823 web guiguio memcached png width 52 designing a distributed in memory kv store or memcached en 174 designing memcached md img src https res cloudinary com dohtidfqh image upload v1580709369 web guiguio facebook png width 52 designing facebook photo storage en 121 designing facebook photo storage md img src https res cloudinary com dohtidfqh image upload v1580710037 web guiguio robinhood png width 52 designing stock exchange en 161 designing stock exchange md img src https res cloudinary com dohtidfqh image upload v1580710037 web guiguio robinhood png width 52 designing smart notification of stock price changes en 162 designing smart notification of stock price changes md img src https res cloudinary com dohtidfqh image upload v1580710085 web guiguio square png width 52 designing square cash or paypal money transfer system en 167 designing paypal money transfer md img src https res cloudinary com dohtidfqh image upload v1580709444 web guiguio stripe png width 52 designing payment webhook en 166 designing payment webhook md img src https res cloudinary com dohtidfqh image upload v1580710137 web guiguio grafana jpg width 52 designing a metric system en 168 designing a metric system md img src https res cloudinary com dohtidfqh image upload v1580710354 web guiguio tiktok webp width 52 designing a recommendation system en 140 designing a recommendation system md img src https res cloudinary com dohtidfqh image upload v1580710222 web guiguio airbnb png width 52 designing airbnb or a hotel booking system en 177 designing airbnb or a hotel booking system md img src https res cloudinary com dohtidfqh image upload v1580710390 web guiguio lyft png width 52 lyft s marketing automation platform symphony en 178 lyft marketing automation symphony md img src https res cloudinary com dohtidfqh image upload v1580709990 web guiguio linkedin png width 52 designing typeahead search or autocomplete en 179 designing typeahead search or autocomplete md img src https res cloudinary com dohtidfqh image upload v1580710529 web guiguio nginx jpg width 52 designing a load balancer or dropbox bandaid en 182 designing l7 load balancer md img src https res cloudinary com dohtidfqh image upload v1580708917 web guiguio uber png width 52 fraud detection with semi supervised learning en 136 fraud detection with semi supervised learning md img src https res cloudinary com dohtidfqh image upload v1595029150 web guiguio favicon 32x32 png width 52 designing online judge or leetcode https tianpan co notes 243 designing online judge or leetcode system design theories introduction to architecture en 145 introduction to architecture md how to scale a web service en 41 how to scale a web service md acid vs base en 2018 07 26 acid vs base md data partition and routing en 2018 07 21 data partition and routing md replica consistency and cap theorem en 2018 07 24 replica and consistency md load balancer types en 2018 07 23 load balancer types md concurrency model en 181 concurrency models md improving availability with failover en 85 improving availability with failover md bloom filter en 68 bloom filter md skiplist en 69 skiplist md b tree vs b tree en 2018 07 22 b tree vs b plus tree md intro to relational database en 80 relational database md 4 kinds of no sql en 78 four kinds of no sql md key value cache en 122 key value cache md stream and batch processing frameworks en 137 stream and batch processing md cloud design patterns en 2018 07 10 cloud design patterns md public api choices en 66 public api choices md lambda architecture en 83 lambda architecture md ios architecture patterns revisited en 123 ios architecture patterns revisited md what can we communicate in soft skills interview en 63 soft skills interview md experience deep dive en 2018 07 20 experience deep dive md 3 programming paradigms en 11 three programming paradigms md solid design principles en 12 solid design principles md how to do capacity planning prepare for an interview effectively introduction to software engineer interview how to crack the coding interview for real how to communicate in the interview experience deep dive culture fit be a software engineer a hero s journey chinese edition zh cn readme md who s tian pan tian pan has been a high performing software engineer and engineering manager working in the san francisco bay area for 10 years previously worked at uber oracle iotex and microsoft join us for further discussion telegram https t me system design and architecture discord https discord gg pb5ybk3ykn license gpl v3 if you found this resource helpful give it a otherwise contribute to it and give it a | architecture interview design design-patterns web interview-questions interview-practice development design-system system-design | os |
iot-dc3 | iot dc3 dc3 open source iot platform device management data collection processing and visualization for your iot solution dc3 iot dc3 iot dc3 rpc rest api rpc dc3 dc3 dc3 iot dc3 spring cloud 4 spring eurake spring zuul spring hystrix spring ribbon spring cloud config spring cloud bus sdk iot dc3 architecture dc3 images iot dc3 architecture1 jpg iot dc3 architecture dc3 images iot dc3 architecture2 jpg dc3 iot bash sh init sh sh build sh sh starup sh sh shutdown sh | server |
|
lumX | lumx join the chat at https gitter im lumapps lumx https badges gitter im lumapps lumx svg https gitter im lumapps lumx utm source badge utm medium badge utm campaign pr badge utm content badge the first responsive front end framework based on angularjs angularjs google material design specifications material lumx will help you design your applications faster and more easily we followed google material design recommendations to bring the best experience to your users quick start three quick start options are available download the latest release release clone the repo git clone https github com lumapps lumx git install with npm npm install official lumx or yarn yarn add official lumx documentation lumx s documentation included in this repo in the demo directory is built with gulp gulp and hosted on google app engine gae at http ui lumapps com the docs may also be run locally running documentation locally 1 if necessary install the python sdk of google app engine gaepython 2 in your environment declare the variable appengine with the path to your google app engine binaries for example using bash in a unix system with the default path will need to edit the bashrc in your home to add bash export appengine home user google cloud sdk bin then install all dependencies run npm install or yarn install then run the build system and the server 1 run gulp 2 in an other terminal run launch sh or dlaunch sh if you want to use docker recommended on macos x 3 visit http localhost 8888 local in your browser and voil or 1 run gulp serve 2 visit http localhost 8080 local in your browser and voil how to get help contribute or provide feedback please refer to our contributing guidelines contributing md the roadmap is available in this repo roadmap md copyright and license code and documentation copyright 2018 lumapps code released under the mit license license md angularjs https angularjs org gae https cloud google com appengine gaepython https cloud google com appengine downloads gulp http gulpjs com local http localhost 8888 material http www google com design spec material design introduction html release https github com lumapps lumx tags | front_end |
|
ML-and-DM-in-action | ml and dm in action readme chinese md directory learn to identify similar images user content learn to identify similar images betameow user content betameow doubanmovie user content doubanmovie my ml package user content ml dudulu user content dudulu chinese poem user poem detail span id learn to identify similar images learn to identify similar images span after reading some papers from internet i implement three algorithms including average hash discrete cosine transform and so on which about how to identify the similar images by python pillow and opencv i also complete a program to find the face from picture and identify the simliar face base on the modal called heer provided by opencv this is another repository and you can find it following this link learn to identify similar images https github com mashimaroljc learn to identify similar images i wrote a article about it to segmentfault but i wrote it in chinese https segmentfault com a 1190000004467183 br https segmentfault com a 1190000004500523 ea 630748 span id betameow betameow span i create betameow which can play gobang game with you after learning about the interesting match between alphago and lee se dol comparing with the previous version the current version has a great difference from the traditional gobang game ai it makes a decision by decision tree instead of search algorithms that the traditional gobang game ai did betameow can keep studying only if you provide data of course thought it s not so perfect i will do my best to update it how to begin download the code and enter following code when you are in the correct directory python ai py open your browser and enter http localhost five then you can play with betameow please make sure that your port 80 is free otherwise you need to modify the code request python 3 4 flask 0 10 1 span id doubanmovie doubanmovie span the web spider made up of spider py and douban py baesd on the model named requests it can collect the information of movie and other video from douban com including follow items title runtime type director actor area star one or more comments the information will save as json format you can set the number of information you want to collect the spider will collect util the queue of mission to be empty when the number is default also the spider support breakpoint collecting the file named info txt will record the information about the program when you continue the process after interruption this information will be load as configuration so don t modify it unless you need datas py is an analysis of the data of the script at present it can do that the relationship between actor and runtime the five actors who has most roles in the good movie or bad movie you can change the standard to distinguish between good movie and bad movie by change the code the relationship between area and runtime the relationship director actor and runtime the five areas where is the production of much of the good movie or bad movie the five directors who has most roles in the good movie or bad movie the five types which has most good movie or bad movie the relationship between star and runtime choose five actors in each type who has most movie in this type without good or bad doubanmovie data you can find about 500 randomly selected data about the movie doubanmovie result you can find the result of running the datas py based on 500 randomly selected data recommend py implements an simple algorithm which recommend goods based on some labels that customer love recently it is suitable for a small number of users and individual users also the code is very easy reading and understanding api py this is a web api based on flask and recommend py using it you can do following things recommend get get the information about recommend movie with json format recommend put moviename anyname comment good let the system know which movie you choose and your comment like good or bad then system will update the model request python 3 4 requests 2 8 1 h3 id ml my ml algorithm package h3 click the link for deatil my ml algorithm package ml h3 id dudulu dudulu h3 api server of text mining dudulu https github com mashimaroljc dudulu h3 id poem poem h3 a chinese poem generator using base rule and probability to be continue other the reposiory record the code i write during i learning the machine learnning and data mining i won t provide a complete data file because they are generally too large to be stored but i will provide some important examples of data if necessary if you are interested in it you can recommend your project about ml or dm and give me your url i will write the url on my readme file at the same time i also hope you can write url of this reposiory on readme file of your project you can open a issue or pull request to me if you have a suggestion or better idea i will continue update the repository for a long time welcome to watch it or give me a star for support thank you license apache license 2 0 contact me twitter fatfatrabbit https twitter com fat fat rabbit | ai |
|
a11y-req | a11y req accessibility requirements generator for information communication technology ict procurement based on en 301 549 2018 use the tool http a11yreq herokuapp com motivation the eu accessible ict procurement toolkit http mandate376 standards eu procurement stages writing a call for tenders wizard technical requirements contains a tool which generates a custom set of accessibility requirements a subset of the functional accessibility requirements clauses from the en 301 549 2014 these clauses are included in a downloadable html document for inclusion in procurements unfortunately this tool was never updated to the 2018 standard the motivation for a11y req was to recreate this system but with a content management system cms to allow the clauses and informative sections to be updated as the en 301 549 refreshes at the same time we wished to generate documents in both french and english functional design decisions initially we followed the same principle of having commonly procured ict as presets each preset has a certain subset of the requirements relevant to that type of ict in the process of piloting actual procurements we found that the technical requirements in each statement of work sow differed enough that a custom set of accessibility requirements should be chosen for each procurement in contrast to the overly simple preset solution selecting each requirement manually is time consuming and requires strong knowledge of the en 301 549 standard a wizard style was chosen as a middle ground between presets and the manual selection inspired by the gsa accessibility requirements tool https www buyaccessible gov the wizard follows three steps 1 the technical authority responsible for the sow answers questions about the ict functionality answering these questions require minimal knowledge of accessibility relevant clauses will be automatically selected based on a mapping between the questions and the clauses 2 optionally requirements can be fine tuned by manually selecting clauses from a checkbox tree each testable clause is an end node leaf in the tree 3 documents are generated from the requirements and can be downloaded in several formats in both french and english all generated documents include a statement which identifies precisely which clauses are included this statement can be copy pasted into this tool at step 2 in order to resume fine tuning of a previous clause selection known issues this application should be considered a prototype while the documents generated are free from textual errors and can be used in actual procurement activities there are a number of unresolved issues including generated documents image captions are not displayed correctly in the word documents as a workaround each image is placed in a two cell table with the caption as the header cell table captions cannot be set as a workaround the caption is placed just above the table in bold text french word documents have language tagging issues the table of requirements is tagged as english in word this issue is not reflected in the code of the document english sections such as references to english documents are tagged as french page breaks cannot be set eg for putting an appendix on a new page nor can keep together properties the concept of paper pages does not exist in html styling of word document is less than ideal mht format is proprietary to word generated documents should be converted to standard docx format before release web applicaton language of french content within rich text editors is tagged as english despite setting ckeditor 5 content language to french alphabetical list styles are not visible in the rich text editor though present in the html of the clauses which was generated outside of ckeditor ckeditor 5 is incompatible with internet explorer 11 content remains editable as raw html in ie11 ckeditor 5 has keyboard accessibility issues when working with tables and images resolving issues the above issues are primarily due to the requirement of generating word documents and the limitations of the html docx js and ckeditor 5 libraries returning to using html as the output format would resolve some of these issues alternately modifying the html docx js library could improve the generation of word documents other issues can be resolved by switching to ckeditor 4 and using the language and list styles plugins an inelegant workaround is simply editing the html manually in ie11 bypassing rich text editor issues styling issues in the word document can be resolved by modifying download css see editing the code below or simply by editing the generated word documents instructions for editing the generated documents are available within the app step 3 instructions other issues documented in this github repo https github com aaact aatia a11y req issues setup running natively install node js npm and mongodb clone this repository git clone https github com aaact aatia a11y req in the created directory run npm install using docker a production ready container has been created for your convenience complete with the pm2 process manager and a nginx reverse proxy usage running natively run mongod to start the database server run mongorestore dump to populate the database run npm run devstart to start the node js server visit localhost 3000 http localhost 3000 to edit content via the cms visit localhost 3000 edit http localhost 3000 edit using docker to specify that the container should populate the database on start set the environment variable populate db to be true this variable is found in dockerfile the container will detect this and run mongorestore on booting to run the application sh docker compose up to rebuild the container sh docker compose up build understanding the code this is a crud application using node express mongodb backend and web experience toolkit frontend the barebones implementation has its own repo wet mongoose https github com juleskuehn wet mongoose the code is based on mozilla s express tutorial https developer mozilla org en us docs learn server side express nodejs wai aria treeview example https www w3 org tr wai aria practices examples treeview treeview 1 treeview 1a html it also depends on the following libraries gcweb theme for wet https wet boew github io themes dist gcweb gcweb theme release v5 0 en html government of canada design system based on bootstrap html docx js https github com evidenceprime html docx js for generating word documents ckeditor 5 https ckeditor com ckeditor 5 rich text editor images are stored in the database inline base64 encoded editing the code the files most likely to require modification are app js in lieu of setting username and password with environment variables you can hardcode them on lines 38 and 39 const basic auth username process env basic auth username admin const basic auth password process env basic auth password admin views wizard pug the main page of the application containing instructions for end users and includes for each step of the wizard views includes wizard form pug wizard questions of form checkbox user facing physical hardware components hardware the first parameter to checkbox is the question itself and the second is the id which needs to be used in mappings js views includes download chooser pug links to generated document which are in fact buttons with formaction attribute pointing to the appropriate download view views download generated document views add views following these examples and link to them in views includes download chooser pug you may have to add or edit includes views download css css for word documents unfortunately editing this is a matter of trial and error as styling support is inconsistent through html docx js library try editing the styles in the generated docx files once better styling is achieved propagate those changes to download css controllers generatorcontroller js options for generating documents common to all download views support open an issue in this repository preferred or email jules kuehn canada ca mailto jules kuehn canada ca | server |
|
AirBnB_clone_v2 | airbnb clone v2 an airbnb project in alx school | server |
|
Rvision | rvision a computer vision library for r img src man figures logo png align right alt width 120 badges start r cmd check https github com swarm lab rvision actions workflows r cmd check yaml badge svg https github com swarm lab rvision actions workflows r cmd check yaml codecov test coverage https codecov io gh swarm lab rvision branch master graph badge svg https app codecov io gh swarm lab rvision branch master cran status https www r pkg org badges version rvision https cran r project org package rvision cranlogs downloads https cranlogs r pkg org badges rvision https cran r project org package rvision doi https zenodo org badge 62589719 svg https zenodo org badge latestdoi 62589719 badges end description rvision https github com swarm lab rvision is a growing computer vision library for r https cran r project org it is based on the powerful opencv http opencv org library for c c the state of the art for computer vision in the open source world the ultimate goal of rvision https github com swarm lab rvision is to provide r users with all the necessary functions to read and manipulate images videos and camera streams with an emphasis on speed thanks to opencv in this respect it is different from all the other image manipulations packages for r that either can not quickly and directly access frames from videos and camera streams or are limited in their processing speed and or volume quick start guides 1 installation instructions https swarm lab github io rvision articles z1 install html 2 input output operations https swarm lab github io rvision articles z2 io html 3 basic operations https swarm lab github io rvision articles z3 basic html 4 in place copy and target operations https swarm lab github io rvision articles z4 inplace html 5 gpu operations https swarm lab github io rvision articles z5 gpu html 6 capture queues https swarm lab github io rvision articles z6 queue html faq can i take selfies with my webcam using rvision https github com swarm lab rvision you certainly can but ask yourself first whether you should r my stream stream 0 0 will start your default webcam in general my selfie readnext my stream plot my selfie release my stream be careful this will trigger the explosion of your camera if it detects that you are making a duck face | r computer-vision opencv | ai |
tzkt | tezos indexer by baking bad made with https img shields io badge made 20with c 23 success svg https docs microsoft com en gb dotnet csharp language reference license mit https img shields io github license baking bad netezos svg https opensource org licenses mit tzkt is the most advanced tezos https tezos com blockchain indexer with powerful api created by the baking bad https bakingbad dev team with huge support from the tezos foundation https tezos foundation the indexer fetches raw data from the tezos blockchain processes it and saves it to its database to provide efficient access to the blockchain data using indexers is necessary part for most blockchain related applications because indexers expose much more data and cover much more use cases than native node rpc for example getting operations by hash or operations related to particular accounts and smart contracts or created nfts or token balances or baking rewards etc features more detailed data tzkt not only collects blockchain data but also processes and extends it to make it more convenient to work with for example tzkt was the first indexer introduced synthetic operation types such as migration or revelation penalty which fill in the gaps in account s history because this data is simply not available from the node micheline to json conversion tzkt automatically converts raw micheline json to human readable json so it s extremely handy to work with transaction parameters contract storages bigmaps keys etc tokens support tzkt also indexes fa1 2 and fa2 tokens including nfts token balances and token transfers including mints and burns as well as token metadata even if it is stored in ipfs data quality comes first you will never see an incorrect account balance or contract storage or missed operations etc tzkt was built by professionals who know tezos from a to z or from tz to kt advanced api tzkt provides a rest like api so you don t have to connect to the database directly but you can if you want in addition to basic data access tzkt api has a lot of cool features such as deep filtering deep selection deep sorting exporting csv statements calculating historical data at some block in the past such as balances storages and bigmap keys injecting historical quotes and metadata built in response cache and much more see the complete api documentation https api tzkt io websocket api tzkt allows to subscribe to real time blockchain data such as new blocks or new operations etc via websocket tzkt uses signalr which is very easy to use and for which there are many client libraries for different languages no local node needed there is no need to run your own local node also the indexer does not create much load on the node rpc so it s ok to use any public one by default it uses rpc tzkt io https rpc tzkt io mainnet chains main blocks head header no archive node needed there is no need to use an archive node running in archive mode if you bootstrap the indexer from the most recent snapshot using a simple rolling node will be enough easy to start indexer bootstrap is very simple and quite fast because you can easily restore it from a fresh snapshot publicly available for all supported networks so you don t need to index the whole blockchain from scratch but of course you can do that if you want validation and diagnostics tzkt indexer validates all incoming data so you will never get to the wrong chain and will never commit corrupted data because of invalid response from the node also the indexer performs self diagnostics after each block which guarantees the correctness of its state after committing new data flexibility and scalability tzkt is split into 3 components indexer database and api which enables quite efficient horizontal scalability see example https baking bad org blog 2019 12 03 tezos explorer tzkt 2 overview of architecture and core components general picture this also enables flexible optimization because you can optimize each component separately and according to your needs postgresql tzkt uses the world s most advanced open source database that gives a lot of possibilities such as removing unused indexes to reduce storage usage or adding specific indexes to increase performance of specific queries you can configure replication clustering partitioning and much more you can use a lot of plugins to enable cool features like graphql this is a really powerful database friendly support we are always happy to help and open for discussions and feature requests feel free to contact us https bakingbad dev installation docker first of all install git make docker docker compose then run the following commands sh git clone https github com baking bad tzkt git cd tzkt make init restores db from the latest snapshot skip it if you want to index from scratch make start starts db indexer and api by default the api will be available at http 127 0 0 1 5000 make stop stops db indexer and api you can configure tzkt via tzkt sync appsettings json indexer and tzkt api appsettings json api all the settings can also be passed via env vars or command line args see an example of how to provide settings via env vars https github com baking bad tzkt blob master docker compose yml l25 and read some tips about indexer configuration configure indexer example for mainnet and api configuration configure api installation from source this guide is for ubuntu 22 04 but even if you use a different os the installation process will likely be the same except for the install packages part install packages install git sudo apt update sudo apt install git install net wget https packages microsoft com config ubuntu 22 04 packages microsoft prod deb o packages microsoft prod deb sudo dpkg i packages microsoft prod deb rm packages microsoft prod deb sudo apt update sudo apt install y dotnet sdk 7 0 install postgresql sudo apt update sudo apt y install postgresql postgresql contrib prepare database create an empty database and its user sudo u postgres psql postgres create database tzkt db postgres create user tzkt with encrypted password qwerty postgres grant all privileges on database tzkt db to tzkt postgres q download fresh snapshot example for mainnet wget https snapshots tzkt io tzkt v1 12 mainnet backup o tmp tzkt db backup restore database from the snapshot c sudo u postgres pg restore c if exists v 1 d tzkt db tmp tzkt db backup notes to speed up the restoration replace 1 with e j n where n is a number of parallel workers e g e j 8 in case of docker use you may need to add u tzkt parameter build configure and run tzkt indexer clone repo git clone https github com baking bad tzkt git tzkt build indexer cd tzkt tzkt sync dotnet publish o tzkt sync configure indexer example for mainnet edit the configuration file tzkt sync appsettings json what you basically need is to adjust the tezosnode endpoint and connectionstrings defaultconnection if needed json tezosnode endpoint https rpc tzkt io mainnet connectionstrings defaultconnection host localhost port 5432 database tzkt db username tzkt password qwerty command timeout 600 read more https www npgsql org doc connection string parameters html about connection string and available parameters chain reorgs and indexing lag to avoid reorgs chain reorganizations you can set the indexing lag tezosnode lag 1 2 blocks lag is enough json tezosnode lag 1 collect metrics you can enable disable prometheus metrics by setting metricsoptions enabled by default they will be available at http localhost 5001 metrics protobuf and http localhost 5001 metrics text plain text json metricsoptions enabled true run indexer c cd tzkt sync dotnet tzkt sync dll that s it if you want to run the indexer as a daemon take a look at this guide https learn microsoft com en us aspnet core host and deploy linux nginx view aspnetcore 7 0 create the service file build configure and run tzkt api suppose you have already cloned the repo to tzkt during the steps above build api cd tzkt tzkt api dotnet publish o tzkt api configure api edit the configuration file tzkt api appsettings json what you basically need is to adjust the connectionstrings defaultconnection if needed like this js connectionstrings defaultconnection host localhost port 5432 database tzkt db username tzkt password qwerty command timeout 600 read more https www npgsql org doc connection string parameters html about connection string and available parameters response cache the api has built in response cache enabled by default you can control the cache size limit by setting the responsecache cachesize mb or disable it by setting to 0 json responsecache cachesize 1024 rpc helpers example for mainnet the api provides rpc helpers endpoints proxied directly to the node rpc specified in the api settings the rpc helpers can be enabled in the rpchelpers section json rpchelpers enabled true endpoint https rpc tzkt io mainnet please notice the api s rpchelpers endpoint must point to the same network with the same chain id as tezosnode endpoint in the indexer otherwise an exception will be thrown collect metrics you can enable disable prometheus metrics by setting metricsoptions enabled by default they will be available at http localhost 5000 metrics protobuf and http localhost 5000 metrics text plain text json metricsoptions enabled true tcp port by default the api is available at the port 5000 you can configure it at kestrel endpoints http url json kestrel endpoints http url http localhost 5000 run api cd tzkt api dotnet tzkt api dll that s it if you want to run the api as a daemon take a look at this guide https learn microsoft com en us aspnet core host and deploy linux nginx view aspnetcore 7 0 create the service file install tzkt indexer and api for testnets in general the steps are the same as for the mainnet you will just need to use a different rpc endpoint and db snapshot here are presets for the current testnets ghostnet snapshot https snapshots tzkt io tzkt v1 12 ghostnet backup rpc node https rpc tzkt io ghostnet mumbainet snapshot https snapshots tzkt io tzkt v1 12 mumbainet backup rpc node https rpc tzkt io mumbainet nairobinet snapshot https snapshots tzkt io tzkt v1 12 nairobinet backup rpc node https rpc tzkt io nairobinet testnets docker first of all install git make docker docker compose then run the following commands sh git clone https github com baking bad tzkt git cd tzkt make ghost init restores db from the latest snapshot skip it if you want to index from scratch make ghost start starts db indexer and api by default the api will be available at http 127 0 0 1 5010 make ghost stop stops db indexer and api have a question feel free to contact us via discord https discord gg ag8xkuwsqd telegram https t me baking bad chat slack https tezos dev slack com archives cv5nx7f2l twitter https twitter com tezosbakingbad email hello bakingbad dev cheers | blockchain-indexer blockchain-api tezos-indexer tezos-blockchain tezos-api tzkt-indexer tzkt-api | blockchain |
justbot | justbot a helpful irc bot with user authentication and authorization jake teton landis just 1 jake gmail com copyright 2012 2013 all rights reserved see file developers md for information about hacking on justbot about justbot is an irc bot based on cinch https github com cinchrb cinch a threaded irc bot framework you can discover the different features availible to justbot users looking at justbot plugins here are a few of the better features back in 2012 before twitter did some api stuff tweet right from irc by typing tweet update text follow all your rescomp freinds at once by typing justbot twitter followall bask in the warm glow of the social as justbot prints tweets to in 3 color glory there are a few components that are not cinch dependent such as the datamapper users support but they are ment to be used from cinch plugins requirements core requirements in order of importance 1 ruby 1 9 1 or better tested to work with 2 0 0 p247 as well 2 cinch 1 framework gem install cinch is the core library for the bot 3 two gems are used for interfacing with the twitter apis 1 twitter is used for most twitter api interaction 2 twitter oauth is used during user creation to get oauth tokens and twitter id 4 users support depends on datamapper 2 for orm although only only dm core dm migrations and dm transactions are required at present it ll try to connect to a sqlite database in config by default edit lib database rb to customize 5 tweets are run through htmlentities 3 before being displayed so you ll need to have that gem installed too 1 https github com cinchrb cinch 2 http datamapper org 3 http htmlentities rubyforge org more requirements justbot session justbot models user these modules have inline rspec tests install rspec or remove the tests justbot plugins steampowered requires steam condenser an apllingly poor gem for interacting with valve software s products this documentation is generated using yard http yardoc org but really if you like ruby or even use it at all you should have yard server gems running somewhere to run cd path to bot ruby bin justbot help for irc users msg botname help will give you an overview of the active plugins in a bot instance help help for justbot plugins administration friendly help registration sessions tweet twitterfeed steam help in help help plugin command show help information for the bot for plugin in bot or for a command in plugin you can then query to get help about specific plugins plugin help uses prefix based matching so help admin will show the help for the adimistration plugin the confusing thing is commands are not called prefixed by module name for example if you wanted to get help about command twitter follow in module twitterfeed you might type the following justbot help twit twitter follow or msg justbot help twit twitter follow but to actually request the command you would type justbot twitter follow justbotirc or msg justbot twitter follow justbotirc project source code access justbot is now open source i still need to move the twitter modules to read config from environemnt variables but for now the config file for twitter stuff config twitter yaml just has my personal oauth keys missing visit justbot online at https github com justjake justbot todos i need to get these things done for justbot to be usable 1 refactor user registration so that it does not depend on twitter oauth a user should be able to register without twitter 2 refactor the user model so that twitter accounts are seperate from justbot users add twitteraccount model with 1 1 link to user 3 update twitter related modules to coordinate thier oauth token retrieval efforts to load tokesn from environment variables twitter plugins should automatically de activate themselves if these environment variables are undefined project idea saltybot provide an irc interface to saltybet the bot will manage a shared saltybet user account with illuminati privelages it should post the names and rankings of contenders each time a new match occurs users in the channel vote on which contender saltybot should place its bet on mockup saltybot round 9245 4570 saltybucks saltybot vs saltybot vegeta ssj4 jonny cage saltybot 12 0 2 85 71 win 70 conf 6 2 0 75 win 50 conf jitl saltybot bet vegeta gchao saltybot bet jonny saltybot voting results 1 for vegeta ssj4 1 for jonny cage saltybot betting 100 on vegeta ssj4 better win ratio in tie saltybot to the salt mines with you sanic4lyfe 50 bobparr 9001 margretthatcher 299 ivantheterrible 400 saltybot round 9245 over jonny cage wins saltybot jitl apply yourself this is your fourth bad call today saltybot gchao don t get cocky kid when ties occur in voting saltybot will bet less money and bet on the better of the two contendors | server |
|
tech_stuff | tech stuff information of latest technology languages java kotlin python golang frameworks spring springboot integration webservices rest api jms design patterns creational patterns abstract factory builder factory method prototype singleton structural patterns adapter bridge composite decorator facade flyweight proxy behavioral patterns chian of responsiblity command interpreter iterator mediator memento observer strategy template method visitor security oauth 2 0 apache cxf spring security openconnectid cloud stuff open stack open shift open paas devops aws azure | server |
|
openrvdas | openrvdas overview the open research vessel data acquisition system openrvdas is a software framework used for building custom data acquisition systems das openrvdas target audiences are oceanographic research vessel operators and operators of other science related platforms that have the need to record streaming data openrvdas is capable of reading data records from serial ports and network aware sensors optionally modifying those data records and streaming either the result to one or more destinations including logfiles network ports databases etc openrvdas is designed to be modular and extensible relying on simple composition of readers transforms and writers to achieve the needed datalogging functionality sample display widgets docs images display widgets small png motivation the primary purpose of an oceanographic research vessel is to gather data from sensors oceanographic research vessels carry a combination of oceanographic meteorological and other specialized sensors some of the more complex sensors i e adcp multibeam imaging systems include specialized data acquisition systems tailored to the particlular sensor many simpler sensors however can simply stream data values over a network port or serial connection at present there are limited options for operators wishing to store and display data from these simple sensors this task is commonly referred to as underway data logging most research vessel operators rely on closed source solutions i e scs winfrog or on dated datalogging systems i e dslog lds for underway data logging both options provide limited support mechanisms thus bugs are slow to be resolved and feature requests are slow to be implemented openrvdas hopes to provide an alternative underway data logging solution that is defined developed and maintained by the global oceanographic research community openrvdas recognizes that each ship is different that each ship has a unique set of sensors and that each ship has a unique way of operating with this understanding openrvdas does not try provide a turn key one size fits all solution but instead provides research vessel operators with a modular and extensible toolset for developing and deploying a custom underway datalogging solution tailored to the vessel s individual needs sample django cruise edit s330 docs images sample cruise edit s330 small png disclaimer the software is provided as is without warranty of any kind express or implied including but not limited to the warranties of merchantability fitness for a particular purpose and noninfringement in no event shall the authors or copyright holders be liable for any claim damages or other liability whether in an action of contract tort or otherwise arising from out of or in connection with the software or the use or other dealings in the software including injury loss of life property sanity or credibility among your peers who will tell you that you really should have known better documentation most openrvdas documentation is gathered in the docs docs subdirectory of this project we recommend beginning with openrvdas introduction and overview docs intro and overview md introduction to loggers docs intro to loggers md and controlling loggers docs controlling loggers md to get started installation openrvdas is written primarily in python 3 1 the installation script at utils install openrvdas sh utils install openrvrdas sh has been tested on centos 7 and 8 ubuntu 18 and 20 raspbian and macos but it may also work on other systems please refer to install md install md for details ship organization dependent code please see the local readme md local readme md file for conventions on where and how to organize your institution s configuration and definition files contributing please contact david pablo cohn david dot cohn at gmail dot com to discuss opportunities for participating in code development license this code is made available under the mit license copyright c 2017 2018 david pablo cohn permission is hereby granted free of charge to any person obtaining a copy of this software and associated documentation files the software to deal in the software without restriction including without limitation the rights to use copy modify merge publish distribute sublicense and or sell copies of the software and to permit persons to whom the software is furnished to do so subject to the following conditions the above copyright notice and this permission notice shall be included in all copies or substantial portions of the software the software is provided as is without warranty of any kind express or implied including but not limited to the warranties of merchantability fitness for a particular purpose and noninfringement in no event shall the authors or copyright holders be liable for any claim damages or other liability whether in an action of contract tort or otherwise arising from out of or in connection with the software or the use or other dealings in the software additional licenses highcharts is a software library made available by http www highcharts com http www highcharts com under the creative commons cc attribution noncommercial licence several of the libraries are included here to support a demonstration of how highcharts may be used to display openrvdas data users of openrvdas who wish to use highcharts are responsible for ensuring that they have the proper licenses to use highcharts in their installation please see the highcharts licensing faq https shop highsoft com faq licensing for details leaflet https leafletjs com is a software library made available under the 2 clause bsd license https github com leaflet leaflet blob master license copyright c 2010 2018 vladimir agafonkin copyright c 2010 2011 cloudmade all rights reserved redistribution and use in source and binary forms with or without modification are permitted provided that the following conditions are met 1 redistributions of source code must retain the above copyright notice this list of conditions and the following disclaimer 2 redistributions in binary form must reproduce the above copyright notice this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution this software is provided by the copyright holders and contributors as is and any express or implied warranties including but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed in no event shall the copyright holder or contributors be liable for any direct indirect incidental special exemplary or consequential damages including but not limited to procurement of substitute goods or services loss of use data or profits or business interruption however caused and on any theory of liability whether in contract strict liability or tort including negligence or otherwise arising in any way out of the use of this software even if advised of the possibility of such damage 1 recommended version of python is 3 6 or higher but most listener code has been verified to run on 3 5 and higher server code such as logger manager py may experience problems on 3 5 due to changes in the async module | data-acquisition vessel-operators highcharts sensor python3 | os |
sui | p align center img src https github com mystenlabs sui blob main doc static sui icon brand png alt logo width 100 height 100 p welcome to sui sui is a next generation smart contract platform with high throughput low latency and an asset oriented programming model powered by the move programming language https github com mystenlabs awesome move sui highlights sui offers the following benefits and capabilities unmatched scalability instant settlement a safe smart contract language accessible to mainstream developers ability to define rich and composable on chain assets better user experience for web3 apps sui is the only blockchain today that can scale with the growth of web3 while achieving industry leading performance cost programmability and usability as sui approaches mainnet launch it will demonstrate capacity beyond the transaction processing capabilities of established systems traditional and blockchain alike sui is the first internet scale programmable blockchain platform a foundational layer for web3 sui architecture mermaid flowchart lr cc cli client clientservice rc rest client clientservice rpcc rpc client clientservice clientservice authorityaggregator authorityaggregator ac1 authorityclient ac2 authorityclient subgraph authority1 as authoritystate end subgraph authority2 as2 authoritystate end ac1 network tcp authority1 ac2 network tcp authority2 sui overview sui is a smart contract platform maintained by a permissionless set of authorities that play a role similar to validators or miners in other blockchain systems sui offers scalability and unprecedented low latency for common use cases sui makes the vast majority of transactions processable in parallel which makes better use of processing resources and offers the option to increase throughput with more resources sui forgoes consensus to instead use simpler and lower latency primitives for common use cases such as payment transactions and asset transfers this is unprecedented in the blockchain world and enables a number of new latency sensitive distributed applications ranging from gaming to retail payment at physical points of sale sui is written in rust https www rust lang org and supports smart contracts written in the move programming language https github com move language move to define assets that may have an owner move programs define operations on these assets including custom rules for their creation the transfer of these assets to new owners and operations that mutate assets sui has a native token called sui with a fixed supply the sui token is used to pay for gas and is also used as delegated stake on authorities https learn bybit com blockchain delegated proof of stake dpos within an epoch the voting power of authorities within this epoch is a function of this delegated stake authorities are periodically reconfigured according to the stake delegated to them in any epoch the set of authorities is byzantine fault tolerant https pmg csail mit edu papers osdi99 pdf at the end of the epoch fees collected through all transactions processed are distributed to authorities according to their contribution to the operation of the system authorities can in turn share some of the fees as rewards to users that delegated stakes to them sui is backed by a number of state of the art peer reviewed works https github com mystenlabs sui blob main doc src contribute research papers md and years of open source development more about sui use the following links to learn more about sui and the sui ecosystem learn more about working with sui in the sui documentation doc src learn index md join the sui community on sui discord https discord gg sui find out more about the sui ecosystem on the sui resources https sui io resources page review information about sui governance decentralization https suifoundation org decentralization and developer grants program https suifoundation org grants on the sui foundation https suifoundation org site | blockchain distributed-ledger-technology move smart-contracts | blockchain |
natural-language-processing-recipes-2e | apress source code this repository accompanies natural language processing recipes 2nd edition https www apress com 9781484273500 by 2021 akshay kulkarni and adarsha shivananda apress 2021 comment cover cover image 9781484273500 jpg download the files as a zip using the green button or clone the repository to your machine using git releases release v1 0 corresponds to the code in the published book without corrections or updates contributions see the file contributing md for more information on how you can contribute to this repository | ai |
|
Project-2-Elk-Stack | automated elk stack deployment the files in this repository were used to configure the network depicted below azure cloud network png image https user images githubusercontent com 83746458 139178737 72be87e4 31df 4f7d a8f1 487b539d7013 png these files have been tested and used to generate a live elk deployment on azure they can be used to either recreate the entire deployment pictured above alternatively select portions of the 3 files may be used to install only certain pieces of it such as filebeat install elk yml https github com supernova2801 project 2 elk stack blob main install elk yml filebeat playbook yml https github com supernova2801 project 2 elk stack blob main filebeat playbook yml metricbeat playbook yml https github com supernova2801 project 2 elk stack blob main metricbeat playbook yml this document contains the following details description of the topologu access policies elk configuration beats in use machines being monitored how to use the ansible build description of the topology the main purpose of this network is to expose a load balanced and monitored instance of dvwa the d mn vulnerable web application load balancing ensures that the application will be highly available in addition to restricting access to the network load balancing is the process of distributing the wight availability a server recieves this is useful in preventing a unusual amount of requests toward a specific server it helps in maintaining the availability of services during a dos attack on the server it can helps move weight from one server to another one in cases of it being uneven and unproportionate without one a server would just get overblown and end up crashing or being easily penetrated integrating an elk server allows users to easily monitor the vulnerable vms for changes to the files system logs metrics filebeat collects data about the file system it helps in detecting changes to files and recorded by tiestamps if a hacker were to attempt to change a directory or file that info is then recorded and transmitted to the elk server metricbeat collects the metrics of the operational state of a workstation on the network some examples would be cpu usage uptime memory disks and more that getes sent to an output like logstash or elasticsearch the configuration details of each machine may be found below name function ip address operating system jump box gateway 10 0 0 4 linux vm 1 server 10 0 0 5 linux vm 2 server 10 0 0 6 linux vm 3 server 10 0 0 7 linux elk vm monitoring 10 1 0 4 linux access policies the machines on the internal network are not exposed to the public internet only the jump box machine can accept connections from the internet access to this machine is only allowed from the designated ip s via ssh for example 10 0 0 5 10 0 0 6 10 0 0 7 10 1 0 4 machines within the network can only be accessed by the jump box vm only the jump box vm can connect to elk and its ip is 10 0 0 4 a summary of the access policies in place can be found in the table below name publicly accessible allowed ip addresses jump box yes no admins ip via ssh web 1 no only from jmp bx 10 0 0 0 24 web 2 no only from jmp bx 10 0 0 0 24 web 3 no only from jmp bx 10 0 0 0 24 elk vm no only from jmp bx 10 0 0 0 24 elk configuration ansible was used to automate configuration of the elk machine no configuration was performed manually which is advantageous because it simplifies the proces pf configuring additional machines or updating changes to all existing ones to the network simultaneously if need be we can make changes to the playbook and it automatically implements it to all the machines designated within the file if there is no playbook we would have to make changes individually to the machines the playbook implements the following tasks installing the docker container installing python pip installing docker python module increases virtual memory downloads and the launches the elk container with ports 5044 5601 9200 the following screenshot displays the result of running docker ps after successfully configuring the elk instance image https user images githubusercontent com 83746458 139181820 f5aa2184 0da0 4757 8479 a55817010dad png target machines beats this elk server is configured to monitor the following machines web 1 web 2 web 3 we have installed the following beats on these machines filebeat metricbeat these beats allow us to collect the following information from each machine filebeat collects data about the file system it helps in detecting changes to files and recorded by tiestamps they simplify compliling and the visiualization of log formats to a command by combinig automtic paths based on your os if a hacker were to attempt to change a directory or file that info is then recorded and transmitted to the elk server filebeast can use instances like logstash or elasticsearch metricbeat collects the metrics of the operational state of a workstation on the network some examples would be cpu usage uptime memory disks and more that getes sent to an output like logstash or elasticsearch using the playbook in order to use the playbook you will need to have an ansible control node already configured assuming you have such a control node provisioned ssh into the control node and follow the steps below copy the install elk yml file to et ansible files update the hosts file to include the elk server ip which os 10 1 0 4 run the playbook playbook yml and navigate to http elk server ip 5601 app kibana to check that the installation worked as expected the playbook is the playbook yml file and its copied in the etc ansible directory you have to update the host file in order to properly run the playbook on a machine you would go to the http elk ip 5601 app kibana | cloud |
|
ota | ota universal overtheair firmware update system for esp open rtos based github repositories with release 0 3 0 this repository has finally migrated to lcm https github com homeaccessorykid life cycle manager if you are an early adopter version 0 3 0 will make the switch over automatically once you trigger an ota update you can monitor lcm using the terminal command on a mac on the same wifi network as your device nc kulnw0 45678 thanks for your interest license copyright 2018 homeaccessorykid hack homeaccessorykid gmail com licensed under the apache license version 2 0 the license you may not use this file except in compliance with the license you may obtain a copy of the license at http www apache org licenses license 2 0 unless required by applicable law or agreed to in writing software distributed under the license is distributed on an as is basis without warranties or conditions of any kind either express or implied see the license for the specific language governing permissions and limitations under the license | os |
|
fend-webpack-content | webpack express example app the goal of this repo is be an example of a basic but functional app built on express and webpack if you are just starting this process start from branch 0 initial setup otherwise switch to the appropriate numbered branches of this repo as needed the branches are 0 initial setup https github com udacity fend webpack content tree 0 initial setup 1 install webpack https github com udacity fend webpack content tree 1 install webpack 2 add webpack entry https github com udacity fend webpack content tree 2 add webpack entry 3 webpack output and loaders https github com udacity fend webpack content tree 3 webpack output and loaders 4 webpack plugins https github com udacity fend webpack content tree 4 webpack plugins 5 webpack mode https github com udacity fend webpack content tree 5 webpack mode 6 webpack for convenience https github com udacity fend webpack content tree 6 webpack for convenience each branch in this project is a step along the path to creating a fully functional webpack setup in each branch there will be a documentation file that lists out the steps taken in that branch each step is also roughly a git commit if you look at the history which you can use as a checklist when setting up your own projects what we will cover we will cover webpack entry point webpack output and dist folder webpack loaders webpack plugins webpack mode tools for convenient webpack development get up and running fork this repo then clone the branch of your choice from your forked repo down to your computer git clone git github com your user name webpack express git cd into your new folder and run npm install npm start to start the app this app runs on localhost 8080 but you can of course edit that in server js note webpack needs to be at version 4 in order for this repo to work as expected webpack is automatically included at the correct version in the package json provided here | front_end |
|
crowd-funding | we must run a test before beginning to operate a new machine https raw githubusercontent com trusttheboy imagesgithub master wechat publick wechatcode jpg because the operator controls with his wire or thread only this centre the attached limbs are just what they should be lifeless pure pendulums governed only by the law of gravity | front_end |
|
kinomajs | kinomajs open source readme this repository contains the source code and documentation of the kinoma software platform for a high level overview of what you ll find here see this document notes introducing the kinomajs open source implementation and faq introducing the kinomajs open source implementation and faq md links to specific sections of this repository are provided below additional resources including our blog http blog kinoma com and developer forum http forum kinoma com can be found on the kinoma website http kinoma com build system the build system for kinomajs open source software supports building for mac os x ios android linux gtk embedded linux and windows targets the build system runs on mac os x yosemite and later windows 7 and linux ubuntu 14 04 p align center img src http kinoma com img github osx png height 75 alt nbsp nbsp img src http kinoma com img github ios png height 75 alt nbsp nbsp img src http kinoma com img github android png height 75 alt nbsp nbsp nbsp img src http kinoma com img github linux png height 75 alt nbsp nbsp img src http kinoma com img github windows png height 75 alt p documentation build instructions build readme md describes the host build environment required to build kinomajs for each supported target platform and the commands used to build an application building ios apps build ios kinomajs ios kinomajs ios md an in depth explanation of how to build ios apps using kinomajs kinoma create command line tools build kinoma create command line tool kinoma create command line tool md discusses the kinoma create command line tool kct6 which is used to install delete and run javascript applications on kinoma create and kinoma element xs6 kinoma s xs6 library implements a javascript virtual machine optimized for devices with limited resources this virtual machine conforms to the 6th edition of the ecmascript specification ecmascript 2015 the javascript application frameworks discussed later in this document used on kinoma create kinoma element desktops and mobile devices are designed to run efficiently on top of xs6 documentation xs overview xs6 xsedit features documentation docs xs xs md provides an introduction to the xs library xs in c xs6 xsedit features documentation docs xs in c xs in c md documents the c interface used to extend xs beyond the ecmascript 2015 standard es6 compatibility test results for kinoma s xs6 javascript engine http kinoma com develop documentation js6 describes xs6 s compliance with the ecmascript 2015 standard and way it which xs6 differs from other javascript engines source code the sources xs6 sources folder contains the native implementations of es6 features the extensions xs6 extensions folder contains important platform features that are not standard to ecmascript such as cryptography xsbug xsbug is a full featured debugger for developers building standalone kinomajs applications shells and tools on all devices running xs xsbug supports over the air debugging of concurrent targets running on different devices similar to other debuggers xsbug supports setting breakpoints browsing source code the call stack and variables for more information about xsbug refer to the xsbug documentation xs6 xsbug6 doc notes md instructions for building xsbug are included in the platform specific build instructions build readme md kinomajs application framework p align center img src http kinoma com media press images img kinomajs sm jpg height 150 alt p the kinomajs application framework can be used to deliver applications on a wide range of consumer electronic products including kinoma create ios and android devices and desktops the primary programming interface to kinomajs is a javascript api of global constructors functions and objects that define the containment hierarchy appearance behavior and flow of applications and shells documentation highlights the kinomajs overview xs6 xsedit features documentation docs overview overview md provides a conceptual overview of kinomajs that will put the documentation and tutorials listed below in context read this first the kinomajs javascript reference xs6 xsedit features documentation docs javascript javascript md provides details on the objects that define the kinomajs api the kinomajs tutorials kinoma kpr notes tutorials kinomajs tutorials md provide sample code and more detailed explanations of the objects defined in the kinomajs javascript reference many of the sample applications in the kpr examples repository https github com kinoma kpr examples are built using kinomajs note these resources are also available in the develop tab http kinoma com develop on the kinoma website source code and additional documentation the kinomajs source code is located in kinoma kpr kinoma kpr for an extended description of what is there and links to relevant documentation and tutorials see this document notes kinomajs md kinoma create resources p align center img src http kinoma com media press images img kinoma create facing left sm jpg height 150 alt p kinoma create uses the kinomajs application framework so all source code tutorials and documentation listed above can be used as references for kinoma create developers the following resources are specific to kinoma create programming with hardware getting started with hardware http kinoma com develop documentation getting started with hardware an overview and samples for the hardware protocols supported by kinoma create programming with hardware pins for kinoma create http kinoma com develop documentation create pins module describes how to program kinoma create s hardware pins using blls javascript modules that interact with hardware kinoma create pins module xs6 xsedit features documentation docs pins pins md documentation on the kinoma create pins module the api to communicate with blls building your own blls http kinoma com develop documentation building a bll defines and describes the rules for building your own custom blls pins simulators kinoma kpr notes tech notes pins simulators note pins simulators md explains how to build your own pins simulators which enable you to develop applications entirely on your computer by simulating the inputs and outputs of hardware modules device management kinoma kpr notes create notes kinoma kpr notes create notes contains the following references to help developers set up and properly use kinoma create kinoma create quick start guide kinoma kpr notes create notes create quick start create quick start md instructions on how to set up and your device and run code for the first time power and charging kinoma kpr notes create notes power and charging power and charging md full details on power source requirements for kinoma create power button kinoma kpr notes create notes power button power button md information about the functions of the power button on kinoma create kinoma element resources p align center img src http kinoma com media press images img kinoma element facing left sm jpg height 150 alt p kinoma element s form factor and resources demand the use of a lighter application framework than kinoma create it therefore does not use the kinomajs application framework detailed above however kinoma element and kinoma create offer many of the same software apis so developers will often be able to re use their code that communicates with pins as well as many modules they create documentation highlights the programmer s guide to kinoma element xs6 xsedit features documentation docs element element md contains essential information programmers developing for kinoma element need to know and documentation for the kinoma element software modules and command line interface the kinoma element quick start guide xs6 xsedit features documentation docs element quick start element quick start md is a guide to setting up your device and quickly getting started writing apps programming with hardware programming with hardware pins for kinoma element xs6 xsedit features documentation docs element bll element bll md describes how to program kinoma element s hardware pins using blls kinoma element pins module xs6 xsedit features documentation docs element pins module element pins module md documentation on the kinoma element pins module the api to communicate with blls building your own blls http kinoma com develop documentation building a bll defines and describes the rules for building your own custom blls source code the source code for kinoma element is located in xs6 sources mc xs6 sources mc kinoma code p align center img src http kinoma com media press images img kinoma code sm jpg height 150 alt p kinoma code is our ide for scripting apps for iot devices you can download it from the kinoma website http kinoma com develop code or build it by following the instructions in the build instructions document build readme md documentation kinoma code overview http kinoma com develop documentation kinoma code overview provides an overview of the features available in kinoma code troubleshooting kinoma element with kinoma code for windows http kinoma com develop documentation element windows troubleshooting advice for getting kinoma code for windows to discover your kinoma element source code the source for kinoma code originally called xsedit is located in xs6 xsedit xs6 xsedit kinomajs blocks p align center img src http kinoma com media press images img kinomajs blocks sm jpg height 150 alt p kinomajs blocks is a visual code editor designed to help developers build starter projects for kinoma create and kinoma element the project is built on angular 2 rc7 and runs in a web browser the live version http kinomajsblocks appspot com static index html is hosted using google app engine but you can modify and build it yourself by following the instructions in this document tools kinomajsblocks readme md documentation kinomajs blocks documentation tools kinomajsblocks docs blockly md provides information about using the kinomajs blocks editor and describes the functionality of each block kpl the kinoma porting layer kpl is the bottom of the kinomajs stack it is a very light portability layer modeled as much as practical on posix because kinomajs runs on a wide variety of operating systems the goal is to isolate all direct calls to the host operating in kpl some rtos hosts do not support the full ansi c library so it cannot even be safely assumed that functions like printf are available to avoid surprises with the size of types a portable type system modeled on that used by quicktime is used kinomajs builds for linux based systems use kpl for historical reasons the ios mac os x android and windows builds do not they rely instead on conditional compilation it is strongly recommended that newly developed ports of the kinoma platform be based on kpl rather than the older method documentation kinoma porting layer core kpl doc kpl pdf discusses how to build new ports of the kinoma platform using the kinoma porting layer including a list of all functions required for the kpl api | server |
|
Backend-Development | telehealthease backend welcome to the telehealth ease backend repository here we will collaborate on building the robust backend infrastructure that powers our healthcare app our focus includes api development data management user authentication and database integration telehealth code | server |
|
inception-v3.torch | torch port of inception v3 scripts to dump tensorflow inception v3 https tensorflow org tutorials image recognition weights and to reconstruct the network in torch the approach is inspired by soumith inception torch https github com soumith inception torch overview dump filters py a python tensorflow script to dump all the weights of inception v3 inceptionv3 lua reads the weights and builds the torch binary equivalent network example lua example use of the torch network usage step 1 tensorflow here are instructions using docker from the host docker run it p 8888 8888 v home myuser code inception v3 torch dump filters py root dump filters py v home myuser data dump root dump gcr io tensorflow tensorflow from the container apt get update apt get install y libhdf5 dev pip install h5py python dump filters py if you have already installed tensorflow just run dump filters py and the script will generate a directory dump with all the filters step 2 torch install pre requisite luarocks install hdf5 given that the filters are dumped in home myuser data dump execute luajit inceptionv3 lua i home myuser data dump o home myuser networks inceptionv3 net b cudnn the parameter b sets the backend to use nn cunn or cudnn the produced binary torch model will be saved in home myuser networks inceptionv3 net test it with an image as follows luajit example lua m home myuser networks inceptionv3 net b cudnn i myimage jpg s synsets txt with tensorflow example image https www tensorflow org versions master images cropped panda jpg you should obtain a result like this results top 5 score 0 847576 n02510455 giant panda panda panda bear coon bear ailuropoda melanoleuca 170 score 0 020494 n02500267 indri indris indri indri indri brevicaudatus 76 score 0 003694 n02509815 lesser panda red panda panda bear cat cat bear ailurus fulgens 8 score 0 001323 n13044778 earthstar 879 score 0 001301 n07760859 custard apple 326 | ai |
|
Solo-Performance-Prompting | official repo of paper solo performance prompting spp https arxiv org abs 2307 05300 illustration of solo performance prompting asset teaser figure horizontal png png setup install dependencies pip install r requirements txt set up openai api configs in config template sh and run source config template sh to set up the env variables note that we are using the azure api in our experiments quick start we provide running scripts for each of the three tasks please check out the comments in the sh scripts for more information trivia creative writing bash scripts trivia creative writing sh codenames collaborative bash scripts codenames collaborative sh logic grid puzzle bash scripts logic grid puzzle sh prompts all prompts can be found in the prompts folder datasets all datasets can be found in the data folder paper experiment results experimental results in the paper for each task can be found in the logs folder each task has two subdirs w sys mes and wo sys mes indicating the two inference settings with and without the system message you are an ai assistant that helps people find information log file formats test output infos contains evaluation metrics for each instance e g correct answers mentioned prompt full input prompt for the api call for codenames task there are two api calls for each instance raw responses raw responses from each api call parsing flag whether the raw response is successfully parsed for codenames task this field is seperated into parsing success flag spymaster and parsing success flag guesser unwrapped output parsed output that will be used for computing evaluation metrics for codenames task this field is seperated into spymaster output and guesser output there is an additional field named hint word which is parsed from the spymaster s output and inserted into the guesser s input the evaluation metric is computed based on the guesser output task data data for the current task instance e g quetions answers target words etc usage logging for the number of tokens and cost spended so far other self explanatory config fields model method temperature etc citations please cite the paper and star this repo if you find this work interesting helpful article wang2023unleashing title unleashing cognitive synergy in large language models a task solving agent through multi persona self collaboration author wang zhenhailong and mao shaoguang and wu wenshan and ge tao and wei furu and ji heng journal arxiv preprint arxiv 2307 05300 year 2023 acknowledgements this codebase referenced the structure of the tree of thought official repo https github com princeton nlp tree of thought llm we thank the authors for their open sourcing efforts | large-language-models prompting llm | ai |
fake-filter_machinelearning_project | fake news classification project h3 font size 15 b fake news filter b font h3 a align center img src https www txstate edu cache78a0c25d34508c9d84822109499dee61 imagehandler scaler gato docs its txstate edu jcr 21b3e33f 31c9 4273 aeb0 5b5886f8bcc4 fake fact jpg mode fit width 1600 height 400 width 800 a task type classification models used xgboost pycaret catboost linearsvc multinomialnb tools used nlp preprocessing tools supervised learning technique feature engineering word cloud | python data-science machine-learning xgboost multinomial-naive-bayes nlp classification-model | cloud |
ICS-Hunter | ics hunter ics hunter in general is a tcp port scanner that specially designed to track industrial control systems this tool is able to detect and display these items ul li open ports li li port banner li li ics device names li ul usage code ics pl host code screenshot https cloud githubusercontent com assets 16362504 16658761 c7c5340e 447c 11e6 8a2c d7f4f57ecfe5 png h2 a id user content dependencies class anchor href dependencies aria hidden true svg aria hidden true class octicon octicon link height 16 version 1 1 viewbox 0 0 16 16 width 16 path d m4 9h1v1h4c 1 5 0 3 1 69 3 3 5s2 55 3 4 3h4c1 45 0 3 1 69 3 3 5 0 1 41 91 2 72 2 3 25v8 59c 58 45 1 1 27 1 2 09c10 5 22 8 98 4 8 4h4c 98 0 2 1 22 2 2 5s3 9 4 9zm9 3h 1v1h1c1 0 2 1 22 2 2 5s13 98 12 13 12h9c 98 0 2 1 22 2 2 5 0 83 42 1 64 1 2 09v6 25c 1 09 53 2 1 84 2 3 25c6 11 31 7 55 13 9 13h4c1 45 0 3 1 69 3 3 5s14 5 6 13 6z path svg a dependencies h2 ul li io socket inet li li io socket li ul article | os |
|
mobile | mobile forthebadge https forthebadge com images badges built with love svg https forthebadge com forthebadge https forthebadge com images badges for you svg https forthebadge com forthebadge https forthebadge com images badges you didnt ask for this svg https forthebadge com mobile development android app architecture guide to app architecture https developer android com jetpack guide gclid cjwkcajwuywsbhbyeiwakd n jivavjwqnrvc3fmbg1gxi26xoa 2sto7cx0msvuelzn6r5safggwroczpqqavd bwe gclsrc aw ds modern android app architecture course https developer android com courses pathways android architecture architecture samples https github com android architecture samples domain layer https developer android com jetpack guide domain layer data layer https developer android com jetpack guide data layer app components activities activity lifecycle https developer android com guide components activities activity lifecycle how to start an activity for result passing data between activities https developer android com guide components activities parcelables and bundles topics view binding https developer android com topic libraries view binding how to migrate existing kotlin synthetics to view binding https developer android com topic libraries view binding migration pagination paging library overview https developer android com topic libraries architecture paging v3 overview recyclerview create a dynamic lists with recyclerview https developer android com guide topics ui layout recyclerview gclid cjwkcajwuywsbhbyeiwakd n ofykdpd jqz 1tyiivqy0pjamki28biu5s74sfmlf7fjb6rdoqpphocms0qavd bwe gclsrc aw ds advanced customization https developer android com guide topics ui layout recyclerview custom swipe to refresh https developer android com training swipe animation viewpager2 https developer android com training animation screen slide 2 video exo player exoplayer codelab https developer android com codelabs exoplayer intro 6 webview https developer android com guide webapps webview jetpack compose jetpack compose https developer android com jetpack compose networking and async charles proxy https www charlesproxy com to debug android traffic setting up charles proxy for android device https community tealiumiq com t5 tealium for android setting up charles to proxy your android device ta p 5121 using charles proxy to debug android ssl traffic https hackupstate medium com using charles proxy to debug android ssl traffic e61fc38760f7 sandwich interface to handle network payload for android https github com skydoves sandwich handling success data and error callback using sandwich https proandroiddev com handling success data and error callback responses from a network for android projects using b53a26214cef flower https github com hadiyarajesh flower data layer enabling caching offline support on android using room https proandroiddev com enabling cache offline support on android using room 4b82ae0c9c88 cache with kotlin coroutines https proandroiddev com caching with kotlin coroutines 7d819276c820 coroutinescache https github com epam coroutinescache android networking and database caching mvvm retrofit room flow https blog devgenius io android networking and database caching in 2020 mvvm retrofit room flow 35b4f897d46a building for billions https developer android com docs quality guidelines build for billions connectivity retrofit effective error handling https blog canopas com retrofit effective error handling with kotlin coroutine and result api 405217e9a73d database dependency injection koin https github com insertkoinio koin koin quickstart https insert koin io docs quickstart kotlin hilt https developer android com training dependency injection hilt android howto how to create splash screen https developer android com guide topics ui splash screen ios | front_end |
|
Cinema-Database | cinema database cinema database as part of engineering studies created 10 2017 learned html sql entity framework this project was created for the needs of engineering studies within the subject of database | server |
|
itsa-website | itsa website information technology students association is a student committee at sardar patel institute of technology this website provides a track of our recent activities and an introduction to the students of our department installation prerequisites npm http npmjs com 1 npm install g bower should be executed once 2 bower install should be executed everytime there is an update | itsa static-website | server |
tips | tips tips and information for troubleshooting some operating systems and technologies | server |
|
fastshell | fastshell build status https travis ci org hosseinkarami fastshell png branch master https travis ci org hosseinkarami fastshell inspired by fireshell http getfireshell com fiercely quick front end boilerplate and workflows the opinionated fastshell framework built for the modern developer for teams and the individual encouraging a better workflow javascript task running build processes autominification and file concatenation wrapped with an enhanced html5 boilerplated framework source github com hosseinkarami fastshell http github com hosseinkarami fastshell documentation docs md https github com hosseinkarami fastshell blob master docs md homepage fastshell https hosseinkarami github io fastshell license the mit license mit copyright c fastshell permission is hereby granted free of charge to any person obtaining a copy of this software and associated documentation files the software to deal in the software without restriction including without limitation the rights to use copy modify merge publish distribute sublicense and or sell copies of the software and to permit persons to whom the software is furnished to do so subject to the following conditions the above copyright notice and this permission notice shall be included in all copies or substantial portions of the software the software is provided as is without warranty of any kind express or implied including but not limited to the warranties of merchantability fitness for a particular purpose and noninfringement in no event shall the authors or copyright holders be liable for any claim damages or other liability whether in an action of contract tort or otherwise arising from out of or in connection with the software or the use or other dealings in the software | gulp fastshell workflow javascript boilerplate html gulpjs browsersync sass | front_end |
BITS | bits business information technology system | server |
|
alibi | p align center img src https raw githubusercontent com seldonio alibi master doc source static alibi explain logo rgb png alt alibi logo width 50 p badges start build status https github com seldonio alibi detect workflows ci badge svg branch master build status documentation status https readthedocs org projects alibi badge version latest docs package codecov https codecov io gh seldonio alibi branch master graph badge svg https codecov io gh seldonio alibi pypi python version https img shields io pypi pyversions alibi logo pypi style flat color blue pypi package pypi package version https img shields io pypi v alibi logo pypi style flat color orange pypi package conda channel only https img shields io conda vn conda forge alibi logo anaconda style flat color orange conda forge package github license https img shields io github license seldonio alibi logo github style flat color green github license slack channel https img shields io badge chat on 20slack e51670 svg slack channel hide platform for now as platform agnostic conda platform https img shields io conda pn conda forge alibi logo anaconda style flat conda forge package github license https github com seldonio alibi blob master license pypi package https pypi org project alibi conda forge package https anaconda org conda forge alibi docs package https docs seldon io projects alibi en stable build status https github com seldonio alibi actions query workflow 3a 22ci 22 slack channel https join slack com t seldondev shared invite zt vejg6ttd ksziqs3o hotpqsen labg badges end alibi https docs seldon io projects alibi is an open source python library aimed at machine learning model inspection and interpretation the focus of the library is to provide high quality implementations of black box white box local and global explanation methods for classification and regression models documentation https docs seldon io projects alibi en stable if you re interested in outlier detection concept drift or adversarial instance detection check out our sister project alibi detect https github com seldonio alibi detect table tr valign top td width 50 a href https docs seldon io projects alibi en stable examples anchor image imagenet html br b anchor explanations for images b br br img src https github com seldonio alibi raw master doc source static anchor image png a td td width 50 a href https docs seldon io projects alibi en stable examples integrated gradients imdb html br b integrated gradients for text b br br img src https github com seldonio alibi raw master doc source static ig text png a td tr tr valign top td width 50 a href https docs seldon io projects alibi en stable methods cfproto html br b counterfactual examples b br br img src https github com seldonio alibi raw master doc source static cf png a td td width 50 a href https docs seldon io projects alibi en stable methods ale html br b accumulated local effects b br br img src https github com seldonio alibi raw master doc source static ale png a td tr table table of contents installation and usage installation and usage supported methods supported methods model explanations model explanations model confidence model confidence prototypes prototypes references and examples references and examples citations citations installation and usage alibi can be installed from pypi or github source with pip anaconda with conda mamba with pip alibi can be installed from pypi https pypi org project alibi bash pip install alibi alternatively the development version can be installed bash pip install git https github com seldonio alibi git to take advantage of distributed computation of explanations install alibi with ray bash pip install alibi ray for shap support install alibi as follows bash pip install alibi shap with conda to install from conda forge https conda forge org it is recommended to use mamba https mamba readthedocs io en stable which can be installed to the base conda enviroment with bash conda install mamba n base c conda forge for the standard alibi install bash mamba install c conda forge alibi for distributed computing support bash mamba install c conda forge alibi ray for shap support bash mamba install c conda forge alibi shap usage the alibi explanation api takes inspiration from scikit learn consisting of distinct initialize fit and explain steps we will use the anchortabular https docs seldon io projects alibi en stable methods anchors html explainer to illustrate the api python from alibi explainers import anchortabular initialize and fit explainer by passing a prediction function and any other required arguments explainer anchortabular predict fn feature names feature names category map category map explainer fit x train explain an instance explanation explainer explain x the explanation returned is an explanation object with attributes meta and data meta is a dictionary containing the explainer metadata and any hyperparameters and data is a dictionary containing everything related to the computed explanation for example for the anchor algorithm the explanation can be accessed via explanation data anchor or explanation anchor the exact details of available fields varies from method to method so we encourage the reader to become familiar with the types of methods supported https docs seldon io projects alibi en stable overview algorithms html supported methods the following tables summarize the possible use cases for each method model explanations method models explanations classification regression tabular text images categorical features train set required distributed ale https docs seldon io projects alibi en stable methods ale html bb global partial dependence https docs seldon io projects alibi en stable methods partialdependence html bb wb global pd variance https docs seldon io projects alibi en stable methods partialdependencevariance html bb wb global permutation importance https docs seldon io projects alibi en stable methods permutationimportance html bb global anchors https docs seldon io projects alibi en stable methods anchors html bb local for tabular cem https docs seldon io projects alibi en stable methods cem html bb tf keras local optional counterfactuals https docs seldon io projects alibi en stable methods cf html bb tf keras local no prototype counterfactuals https docs seldon io projects alibi en stable methods cfproto html bb tf keras local optional counterfactuals with rl https docs seldon io projects alibi en stable methods cfrl html bb local integrated gradients https docs seldon io projects alibi en stable methods integratedgradients html tf keras local optional kernel shap https docs seldon io projects alibi en stable methods kernelshap html bb local br br global tree shap https docs seldon io projects alibi en stable methods treeshap html wb local br br global optional similarity explanations https docs seldon io projects alibi en stable methods similarity html wb local model confidence these algorithms provide instance specific scores measuring the model confidence for making a particular prediction method models classification regression tabular text images categorical features train set required trust scores https docs seldon io projects alibi en stable methods trustscores html bb 1 2 yes linearity measure https docs seldon io projects alibi en stable methods linearitymeasure html bb optional key bb black box only require a prediction function bb black box but assume model is differentiable wb requires white box model access there may be limitations on models supported tf keras tensorflow models via the keras api local instance specific explanation why was this prediction made global explains the model with respect to a set of instances 1 depending on model 2 may require dimensionality reduction prototypes these algorithms provide a distilled view of the dataset and help construct a 1 knn interpretable classifier method classification regression tabular text images categorical features train set labels protoselect https docs seldon io projects alibi en latest methods protoselect html optional references and examples accumulated local effects ale apley and zhu 2016 https arxiv org abs 1612 08468 documentation https docs seldon io projects alibi en stable methods ale html examples california housing dataset https docs seldon io projects alibi en stable examples ale regression california html iris dataset https docs seldon io projects alibi en stable examples ale classification html partial dependence j h friedman 2001 https projecteuclid org journals annals of statistics volume 29 issue 5 greedy function approximation a gradient boostingmachine 10 1214 aos 1013203451 full documentation https docs seldon io projects alibi en stable methods partialdependence html examples bike rental https docs seldon io projects alibi en stable examples pdp regression bike html partial dependence variance greenwell et al 2018 https arxiv org abs 1805 04755 documentation https docs seldon io projects alibi en stable methods partialdependencevariance html examples friedman s regression problem https docs seldon io projects alibi en stable examples pd variance regression friedman html permutation importance breiman 2001 https link springer com article 10 1023 a 1010933404324 fisher et al 2018 https arxiv org abs 1801 01489 documentation https docs seldon io projects alibi en stable methods permutationimportance html examples who s going to leave next https docs seldon io projects alibi en stable examples permutation importance classification leave html anchor explanations ribeiro et al 2018 https homes cs washington edu marcotcr aaai18 pdf documentation https docs seldon io projects alibi en stable methods anchors html examples income prediction https docs seldon io projects alibi en stable examples anchor tabular adult html iris dataset https docs seldon io projects alibi en stable examples anchor tabular iris html movie sentiment classification https docs seldon io projects alibi en stable examples anchor text movie html imagenet https docs seldon io projects alibi en stable examples anchor image imagenet html fashion mnist https docs seldon io projects alibi en stable examples anchor image fashion mnist html contrastive explanation method cem dhurandhar et al 2018 https papers nips cc paper 7340 explanations based on the missing towards contrastive explanations with pertinent negatives documentation https docs seldon io projects alibi en stable methods cem html examples mnist https docs seldon io projects alibi en stable examples cem mnist html iris dataset https docs seldon io projects alibi en stable examples cem iris html counterfactual explanations extension of wachter et al 2017 https arxiv org abs 1711 00399 documentation https docs seldon io projects alibi en stable methods cf html examples mnist https docs seldon io projects alibi en stable examples cf mnist html counterfactual explanations guided by prototypes van looveren and klaise 2019 https arxiv org abs 1907 02584 documentation https docs seldon io projects alibi en stable methods cfproto html examples mnist https docs seldon io projects alibi en stable examples cfproto mnist html california housing dataset https docs seldon io projects alibi en stable examples cfproto housing html adult income one hot https docs seldon io projects alibi en stable examples cfproto cat adult ohe html adult income ordinal https docs seldon io projects alibi en stable examples cfproto cat adult ord html model agnostic counterfactual explanations via rl samoilescu et al 2021 https arxiv org abs 2106 02597 documentation https docs seldon io projects alibi en stable methods cfrl html examples mnist https docs seldon io projects alibi en stable examples cfrl mnist html adult income https docs seldon io projects alibi en stable examples cfrl adult html integrated gradients sundararajan et al 2017 https arxiv org abs 1703 01365 documentation https docs seldon io projects alibi en stable methods integratedgradients html examples mnist example https docs seldon io projects alibi en stable examples integrated gradients mnist html imagenet example https docs seldon io projects alibi en stable examples integrated gradients imagenet html imdb example https docs seldon io projects alibi en stable examples integrated gradients imdb html kernel shapley additive explanations lundberg et al 2017 https papers nips cc paper 7062 a unified approach to interpreting model predictions documentation https docs seldon io projects alibi en stable methods kernelshap html examples svm with continuous data https docs seldon io projects alibi en stable examples kernel shap wine intro html multinomial logistic regression with continous data https docs seldon io projects alibi en stable examples kernel shap wine lr html handling categorical variables https docs seldon io projects alibi en stable examples kernel shap adult lr html tree shapley additive explanations lundberg et al 2020 https www nature com articles s42256 019 0138 9 documentation https docs seldon io projects alibi en stable methods treeshap html examples interventional adult income xgboost https docs seldon io projects alibi en stable examples interventional tree shap adult xgb html path dependent adult income xgboost https docs seldon io projects alibi en stable examples path dependent tree shap adult xgb html trust scores jiang et al 2018 https arxiv org abs 1805 11783 documentation https docs seldon io projects alibi en stable methods trustscores html examples mnist https docs seldon io projects alibi en stable examples trustscore mnist html iris dataset https docs seldon io projects alibi en stable examples trustscore mnist html linearity measure documentation https docs seldon io projects alibi en stable methods linearitymeasure html examples iris dataset https docs seldon io projects alibi en stable examples linearity measure iris html fashion mnist https docs seldon io projects alibi en stable examples linearity measure fashion mnist html protoselect documentation https docs seldon io projects alibi en latest methods protoselect html examples adult census cifar10 https docs seldon io projects alibi en latest examples protoselect adult cifar10 html similarity explanations documentation https docs seldon io projects alibi en stable methods similarity html examples 20 news groups dataset https docs seldon io projects alibi en stable examples similarity explanations 20ng html imagenet dataset https docs seldon io projects alibi en stable examples similarity explanations imagenet html mnist dataset https docs seldon io projects alibi en stable examples similarity explanations mnist html citations if you use alibi in your research please consider citing it bibtex entry article jmlr v22 21 0017 author janis klaise and arnaud van looveren and giovanni vacanti and alexandru coca title alibi explain algorithms for explaining machine learning models journal journal of machine learning research year 2021 volume 22 number 181 pages 1 7 url http jmlr org papers v22 21 0017 html | machine-learning explanations interpretability counterfactual xai | ai |
iOS-Applied-Engineering-App | ios applied engineering app source code for the ios applied engineering app xcode setup after cloning you must generate your own xcode project that will be specific to your computer before continuing you must first make sure you have brew https brew sh and cocoapods https cocoapods org installed afterwards make sure you install xcodegen https github com yonaskolb xcodegen by running this command in the terminal brew install xcodegen next run these commands in order 1 cd ios applied engineering app applied engineering 2 xcodegen this should generate a xcodeproj file do not open it 3 pod install this should generate a xcworkspace now open the generated xcworkspace file make sure to select the applied engineering target on the top bar now click on the applied engineering project as opposed to the pods project under the signing capabilities tab make sure to sign into our shared apple developer account via our apple id now make a selection for a team select arcadia unified school district you should now be all set up and ready to compile the app tip if you pull a commit that has either added or deleted a file and that file change is not shown in xcode all you have to do is rerun xcodegen and pod install again however make sure you are in this directory ios applied engineering app applied engineering | os |
|
FreeRTOS_for_ESP32 | freertos for esp32 freertos for esp32 this repo contains the code used for the book https www elektor com freertos for esp32 arduino e book | os |
|
iota.py | h1 align center br a href https docs iota org docs client libraries 0 1 getting started python quickstart img src iota python png a h1 h2 align center the official python client library for interacting with the tangle h2 p align center a href https docs iota org docs client libraries 0 1 getting started python quickstart style text decoration none img src https img shields io badge documentation 20portal blue svg style for the badge alt developer documentation portal p p align center a href http pyota readthedocs io en latest badge latest style text decoration none img src https img shields io badge readthedocs reference informational svg alt auto generated docs a a href https discord iota org style text decoration none img src https img shields io badge discord 9cf svg logo discord alt discord a a href https iota stackexchange com style text decoration none img src https img shields io badge stackexchange 9cf svg logo stackexchange alt stackexchange a a href https github com iotaledger entangled blob develop license style text decoration none img src https img shields io github license iotaledger iota py svg alt mit license a a href https docs iota org docs node software 0 1 iri references api reference style text decoration none img src https img shields io badge node 20api 20coverage 18 18 20commands green svg alt supported iri api endpoints a a href https travis ci org iotaledger iota py style text decoration none img src https travis ci org iotaledger iota py svg branch master alt build status a p p align center a href about about a a href prerequisites prerequisites a a href installation installation a a href getting started getting started a a href examples examples a a href supporting the project supporting the project a a href joining the discussion joining the discussion a p about this is the official python client library which allows you to do the following create transactions read transactions sign transactions generate addresses this is beta software so there may be performance and stability issues please report any issues in our issue tracker https github com iotaledger iota py issues new prerequisites to install the iota python client library and its dependencies you need python version 3 7 or 3 6 installed on your device installation to download the iota python client library and its dependencies do the following bash pip install pyota installing the optional c extension pyota has an optional c extension that improves the performance of its cryptography features by an average of 60 times to install this extension do the following bash pip install pyota ccurl installing the optional module for local proof of work to do proof of work on your local device without relying on a node you can install the pyota pow https pypi org project pyota pow extension module to install this extension use the following command bash pip install pyota pow when you ve installed this module you can use it by passing the local pow true argument to your api instance doing so will redirect all attach to tangle api calls to an interface function in the pow package installing from source to install the library from the source code on github do the following bash recommended but not required create virtualenv git clone https github com iotaledger iota py git pip install e getting started after you ve installing the library installation you can connect to an iri node to send transactions to it and interact with the ledger an extended guide can be found on our documentation portal https docs iota org docs client libraries 0 1 getting started python quickstart we strongly recommend you to go here for starting off a quick starting tutorial is shown below to connect to a local iri node you can do the following py from iota import iota create a new instance of the iota api object specify which node to connect to api iota adapter https nodes devnet iota org 443 call the get node info method for information about the node and the tangle response api get node info print response examples we have a list of test cases in the examples directory https github com iotaledger iota py tree master examples that you can use as a reference when developing apps with iota here s how you could send a zero value transaction using the library for the guide see the documentation portal https docs iota org docs client libraries 0 1 how to guides python send your first bundle python you don t need a seed to send zero value transactions api iota https nodes devnet iota org 443 devnet true define a message to send this message must include only ascii characters message trytestring from unicode hello world define an address this does not need to belong to anyone or have iota tokens it must only contain a maximum of 81 trytes or 90 trytes with a valid checksum address zlgveq9juzzwczxlwvnthbdx9g9kztjp9veeriifhy9siqkybvahimlhxpqve9ixfddxnhqinxjdrpfdxnyvaplzaw define a zero value transaction object that sends the message to the address tx proposedtransaction address address address message message value 0 create a bundle from the proposedtransaction object and send the transaction to the node result api send transfer transfers tx print bundle print result bundle hash supporting the project if the iota python client library has been useful to you and you feel like contributing consider posting a bug report https github com iotaledger iota py issues new issue feature request or a pull request https github com iotaledger iota py pulls we have some basic contribution guidelines github contributing md to keep our code base stable and consistent running test cases to run test do the following bash python setup py test pyota is also compatible with tox https tox readthedocs io which will run the unit tests in different virtual environments one for each supported version of python to run the unit tests it is recommended that you use the p argument this speeds up the tests by running them in parallel install pyota with the test runner extra to set up the necessary dependencies and then you can run the tests with the tox command bash pip install e test runner tox v p all building the autogenerated documentation the autogenerated documentation can be generated on your local device by doing the following bash install extra dependencies you only have to do this once pip install docs builder cd docs build the documentation make html joining the discussion if you want to get involved in the community need help with getting set up have any issues related with the library or just want to discuss blockchain distributed ledgers and iot with other people feel free to join our discord https discord iota org | iota tangle cryptocurrency balanced-ternary api python-3 python-3-6 python-3-7 | server |
buddhism-nlp | buddhism nlp natural language processing on buddhist texts in p li and sanskrit mostly corpus linguistics | ai |
|
100-times-faster-nlp | 100 times faster natural language processing in python this repository contains an ipython notebook accompanying the post 100 times faster natural language processing in python https medium com huggingface 100 times faster natural language processing in python ee32033bdced the notebook contains all the examples of the post running in a ipython session online the notebook can be better visualized on nbviewer https nbviewer jupyter org github huggingface 100 times faster nlp blob master 100 times faster nlp in python ipynb github s ipynb visualizer doesn t render well cython interactive annotations | ai |
|
phoenix-rtos-lwip | lwip network server for phoenix rtos run bash netsrv driver driver where driver is one of 1 rtl8139c eg as emulated by qemu rtl pcidev irq pcidev bus 8 dev 3 fn 0 for qemu it s usually rtl 0x10 10 2 imx 6ull enet module freescale ethernet controller enet mmio irq no mdio phyinfo enet1 enet2 mmio 0x02188000 0x020b4000 irq 150 152 no mdio disables mdio support only one module can drive mdio bus when an external phy is used phyinfo is formatted as follows phy busnr id reset n dev gpiox irq n dev gpiox busnr bus registered by driver in driver arg order counted from 0 id phy address reset irq gpio descriptors minus signal is active low n pin number dev gpiox gpio bank driver node when gpios are used gpiosrv must be already running imx 6ull s evaluation board needs enet 0x02188000 150 phy 0 2 reset 1 dev gpio6 irq 5 dev gpio5 enet 0x020b4000 152 no mdio phy 0 1 reset 2 dev gpio6 irq 6 dev gpio5 build bash make target target where target matches kernel libphoenix target value license this work is licensed under a bsd license see the license file for details spdx license identifier bsd 3 clause | os |
|
QPUC | getting started with create react app this project was bootstrapped with create react app https github com facebook create react app available scripts in the project directory you can run npm start runs the app in the development mode open http localhost 3000 http localhost 3000 to view it in your browser the page will reload when you make changes you may also see any lint errors in the console npm test launches the test runner in the interactive watch mode see the section about running tests https facebook github io create react app docs running tests for more information npm run build builds the app for production to the build folder it correctly bundles react in production mode and optimizes the build for the best performance the build is minified and the filenames include the hashes your app is ready to be deployed see the section about deployment https facebook github io create react app docs deployment for more information npm run eject note this is a one way operation once you eject you can t go back if you aren t satisfied with the build tool and configuration choices you can eject at any time this command will remove the single build dependency from your project instead it will copy all the configuration files and the transitive dependencies webpack babel eslint etc right into your project so you have full control over them all of the commands except eject will still work but they will point to the copied scripts so you can tweak them at this point you re on your own you don t have to ever use eject the curated feature set is suitable for small and middle deployments and you shouldn t feel obligated to use this feature however we understand that this tool wouldn t be useful if you couldn t customize it when you are ready for it learn more you can learn more in the create react app documentation https facebook github io create react app docs getting started to learn react check out the react documentation https reactjs org code splitting this section has moved here https facebook github io create react app docs code splitting https facebook github io create react app docs code splitting analyzing the bundle size this section has moved here https facebook github io create react app docs analyzing the bundle size https facebook github io create react app docs analyzing the bundle size making a progressive web app this section has moved here https facebook github io create react app docs making a progressive web app https facebook github io create react app docs making a progressive web app advanced configuration this section has moved here https facebook github io create react app docs advanced configuration https facebook github io create react app docs advanced configuration deployment this section has moved here https facebook github io create react app docs deployment https facebook github io create react app docs deployment npm run build fails to minify this section has moved here https facebook github io create react app docs troubleshooting npm run build fails to minify https facebook github io create react app docs troubleshooting npm run build fails to minify | server |
|
nuttx-star64 | pine64 star64 64 bit risc v sbc https lupyuen github io images star64 title jpg apache nuttx rtos for pine64 star64 64 bit risc v sbc starfive jh7110 daily build of nuttx for star64 https github com lupyuen nuttx star64 actions workflows star64 yml badge svg https github com lupyuen nuttx star64 actions workflows star64 yml read the articles star64 jh7110 risc v sbc experiments with opensbi supervisor binary interface https lupyuen github io articles sbi risc v star64 jh7110 power up the display controller with u boot bootloader https lupyuen github io articles display3 risc v star64 jh7110 inside the display controller https lupyuen github io articles display2 rtos on a risc v sbc star64 jh7110 apache nuttx https www hackster io lupyuen rtos on a risc v sbc star64 jh7110 apache nuttx 2a7429 star64 jh7110 nuttx rtos creating the first release for the risc v sbc https lupyuen github io articles release star64 jh7110 nuttx rtos risc v plic interrupts and serial i o https lupyuen github io articles plic star64 jh7110 nuttx rtos risc v semihosting and initial ram disk https lupyuen github io articles semihost star64 jh7110 nuttx rtos risc v privilege levels and uart registers https lupyuen github io articles privilege apache nuttx rtos on risc v star64 jh7110 sbc https lupyuen github io articles nuttx2 star64 jh7110 risc v sbc boot from network with u boot and tftp https lupyuen github io articles tftp strange workaround for tftp timeout in u boot bootloader star64 jh7110 risc v sbc https lupyuen github io articles tftp2 earlier articles booting risc v linux on star64 jh7110 sbc https lupyuen github io articles linux inspecting the risc v linux images for star64 jh7110 sbc https lupyuen github io articles star64 64 bit risc v with apache nuttx real time operating system https lupyuen github io articles riscv rolling to risc v https lupyuen github io articles pinephone2 rolling to risc v many thanks to cnxsoft for the coverage star64 risc v sbc can now boot apache nuttx real time operating system https www cnx software com 2023 08 17 star64 risc v sbc apache nuttx real time operating system let s port apache nuttx rtos to pine64 star64 https wiki pine64 org wiki star64 64 bit risc v sbc based on starfive jh7110 soc https doc en rvspace org doc center jh7110 html nuttx now officially supports star64 jh7110 https nuttx apache org docs latest platforms risc v jh7110 boards star64 index html nuttx works ok on starfive visionfive 2 sbc too https lupyuen github io articles release whats next hopefully nuttx will run on pine64 pinetab v which is also based on starfive jh7110 soc nuttx automated daily build for star64 nuttx for star64 is now built automatically every day via github actions the daily releases are available here nuttx star64 releases https github com lupyuen nuttx star64 releases nuttx hash https github com lupyuen nuttx star64 releases download nuttx star64 2023 08 11 nuttx hash contains the commit hash of the nuttx kernel and nuttx apps repos text nuttx source https github com apache nuttx tree fa676f264fa16253213ff665052ba4691e56bf05 nuttx apps https github com apache nuttx apps tree 6196e03337a3c677aba0c74e815af16e7075bc71 the github actions workflow is here star64 yml https github com lupyuen nuttx star64 blob main github workflows star64 yml maybe someday we ll do daily automated testing 1 download the daily build to tftp server 1 power on star64 with an ikea smart power plug via home assistant https lupyuen github io articles tftp whats next 1 star64 boots the daily build over tftp 1 capture the automated testing log and write to the release notes similar to bl602 https lupyuen github io articles auto linux images for star64 read the article inspecting the risc v linux images for star64 jh7110 sbc https lupyuen github io articles star64 let s examine the linux images for star64 sbc to see how u boot bootloader is configured we ll boot nuttx later with u boot according to software releases for star64 https wiki pine64 org wiki star64 software releases we have yocto images https github com fishwaldo meta pine64 at pine64 my ho st https pine64 my ho st 8443 let s inspect star64 image minimal https pine64 my ho st 8443 star64 image minimal star64 1 2 wic bz2 armbian images https www armbian com star64 let s inspect armbian 23 8 lunar minimal https github com armbianro os releases download 23 8 0 trunk 56 armbian 23 8 0 trunk 56 star64 lunar edge 5 15 0 minimal img xz current state of risc v linux linux on risc v 2022 https docs google com presentation d 1a0a6dngyxr mppeg7qunqbv yeppqid urswqe8sj8m edit slide id p armbian image for star64 read the article inspecting the risc v linux images for star64 jh7110 sbc https lupyuen github io articles star64 let s inspect the armbian image for star64 armbian 23 8 lunar minimal https github com armbianro os releases download 23 8 0 trunk 56 armbian 23 8 0 trunk 56 star64 lunar edge 5 15 0 minimal img xz uncompress the xz mount the img file on linux macos windows as an iso volume the image contains 1 used partition armbi root 612 mb that contains the linux root filesystem plus one unused partition 4 mb at the top partition table armbian image for star64 https lupyuen github io images star64 armbian png we see the u boot bootloader configuration at armbi root boot extlinux extlinux conf text label armbian kernel boot image initrd boot uinitrd fdt boot dtb starfive jh7110 star64 pine64 dtb append root uuid 99f62df4 be35 475c 99ef 2ba3f74fe6b5 console ttys0 115200n8 console tty0 earlycon sbi rootflags data writeback stmmaceth chain mode 1 rw rw no console suspend consoleblank 0 fsck fix yes fsck repair yes net ifnames 0 splash plymouth ignore serial consoles this says that u boot will load the linux kernel from armbi root boot image which is sym linked to armbi root boot vmlinuz 5 15 0 starfive2 where in ram will the kernel image be loaded according to kernel addr r https u boot readthedocs io en latest develop bootstd html environment variables from the default u boot settings https github com lupyuen nuttx star64 u boot settings for star64 the linux kernel will be loaded at ram address 0x4020 0000 text kernel addr r 0x40200000 source https github com lupyuen nuttx star64 u boot settings for star64 everything looks hunky dory nope the flattened device tree fdt https u boot readthedocs io en latest develop devicetree index html is missing but the flattened device tree fdt is missing boot dtb starfive jh7110 star64 pine64 dtb text fdt boot dtb starfive jh7110 star64 pine64 dtb which means that armbian will fail to boot https github com lupyuen nuttx star64 boot armbian on star64 on star64 text retrieving file boot uinitrd 10911538 bytes read in 466 ms 22 3 mib s retrieving file boot image 22040576 bytes read in 936 ms 22 5 mib s retrieving file boot dtb starfive jh7110 star64 pine64 dtb failed to load boot dtb starfive jh7110 star64 pine64 dtb source https github com lupyuen nuttx star64 boot armbian on star64 the missing device tree is noted in this pine64 forum post https forum pine64 org showthread php tid 18276 pid 117607 pid117607 so we might need to check back later for the official armbian image if it s fixed balbes150 suggests that we try this armbian image instead https forum pine64 org showthread php tid 18420 pid 118331 pid118331 for reference here s the list of supported device trees text ls volumes armbi root boot dtb 5 15 0 starfive2 starfive evb overlay jh7110 evb usbdevice dtb jh7110 evb can pdm pwmdac dtb jh7110 evb dtb jh7110 evb dvp rgb2hdmi dtb jh7110 fpga dtb jh7110 evb i2s ac108 dtb jh7110 visionfive v2 a10 dtb jh7110 evb pcie i2s sd dtb jh7110 visionfive v2 a11 dtb jh7110 evb spi uart2 dtb jh7110 visionfive v2 ac108 dtb jh7110 evb uart1 rgb2hdmi dtb jh7110 visionfive v2 wm8960 dtb jh7110 evb uart4 emmc spdif dtb jh7110 visionfive v2 dtb jh7110 evb uart5 pwm i2c tdm dtb vf2 overlay and here are the other files in boot text ls l volumes armbi root boot total 94416 lrwxrwxrwx 24 image vmlinuz 5 15 0 starfive2 rw r r 4276712 system map 5 15 0 starfive2 rw r r 1536 armbian first run txt template rw r r 38518 boot bmp rw r r 144938 config 5 15 0 starfive2 lrwxrwxrwx 20 dtb dtb 5 15 0 starfive2 drwxr xr x 0 dtb 5 15 0 starfive2 drwxrwxr x 0 extlinux lrwxrwxrwx 27 initrd img initrd img 5 15 0 starfive2 rw r r 10911474 initrd img 5 15 0 starfive2 lrwxrwxrwx 27 initrd img old initrd img 5 15 0 starfive2 rw rw r 341 uenv txt lrwxrwxrwx 24 uinitrd uinitrd 5 15 0 starfive2 rw r r 10911538 uinitrd 5 15 0 starfive2 lrwxrwxrwx 24 vmlinuz vmlinuz 5 15 0 starfive2 rw r r 22040576 vmlinuz 5 15 0 starfive2 lrwxrwxrwx 24 vmlinuz old vmlinuz 5 15 0 starfive2 todo explain boot uinitrd ram disk yocto image for star64 read the article inspecting the risc v linux images for star64 jh7110 sbc https lupyuen github io articles star64 let s inspect the yocto image for star64 star64 image minimal https pine64 my ho st 8443 star64 image minimal star64 1 2 wic bz2 uncompress the bz2 rename as img balena etcher won t work with bz2 files write the img to a microsd card with balena etcher insert the microsd card into a linux machine like pinebook pro we see 4 used partitions spl 2 mb secondary program loader https u boot readthedocs io en latest board starfive visionfive2 html flashing uboot 4 mb u boot bootloader https u boot readthedocs io en latest board starfive visionfive2 html flashing boot 380 mb u boot configuration and linux kernel image root 686 mb linux root filesystem plus one unused partition 2 mb at the top partition table yocto image for star64 https lupyuen github io images star64 yocto png boot partition has 2 files text ls l run media user boot total 14808 rw r r 1 15151064 apr 6 2011 fitimage rw r r 1 1562 apr 6 2011 vf2 uenv txt boot vf2 uenv txt contains the u boot bootloader configuration text this is the sample jh7110 uenv txt file for starfive visionfive u boot the current convention subject to change is that this file will be loaded from the third partition on the mmc card devnum 1 partnum 3 the fit file to boot from fitfile fitimage for debugging boot bootargs ext if test devnum 0 then setenv bootargs earlyprintk console tty1 console ttys0 115200 rootwait earlycon sbi root dev mmcblk0p4 else setenv bootargs earlyprintk console tty1 console ttys0 115200 rootwait earlycon sbi root dev mmcblk1p4 fi bootargs earlyprintk console ttys0 115200 debug rootwait earlycon sbi root dev mmcblk1p4 for addr info fileaddr 0xa0000000 fdtaddr 0x46000000 boot linux flat or compressed image stored at kernel addr r kernel addr r 0x40200000 irdaddr 46100000 irdsize 5f00000 use the fdt in the fit image setupfdt1 fdt addr fdtaddr fdt resize setupird setexpr irdend irdaddr irdsize fdt set chosen linux initrd start 0x0 0x irdaddr fdt set chosen linux initrd end 0x0 0x irdend setupfdt2 fdt set chosen bootargs bootargs bootwait setenv delay bootdelay echo delay while test delay 0 do sleep 1 setexpr delay delay 1 echo delay done boot2 run bootargs ext mmc dev devnum fatload mmc devnum partnum fileaddr fitfile bootm start fileaddr run setupfdt1 run setupird run setupfdt2 bootm loados fileaddr run chipa set linux run cpu vol set echo booting kernel in booti kernel addr r irdaddr filesize fdtaddr kernel addr r https u boot readthedocs io en latest develop bootstd html environment variables says that linux kernel will be loaded at 0x4020 0000 text boot linux flat or compressed image stored at kernel addr r kernel addr r 0x40200000 yocto boots from the flat image tree fit https u boot readthedocs io en latest usage fit index html boot fitimage yocto s root boot looks different from armbian text ls l run media user root boot total 24376 lrwxrwxrwx 1 17 mar 9 2018 fitimage fitimage 5 15 107 rw r r 1 9807808 mar 9 2018 fitimage 5 15 107 rw r r 1 15151064 mar 9 2018 fitimage initramfs 5 15 107 boot nuttx with u boot bootloader read the article inspecting the risc v linux images for star64 jh7110 sbc https lupyuen github io articles star64 will we boot nuttx with armbian or yocto settings armbian looks simpler since it uses a plain linux kernel image file image instead of yocto s complicated flat image tree hence we ll overwrite armbian s armbi root boot image by the nuttx kernel image we ll compile nuttx kernel to boot at 0x4020 0000 nuttx kernel will begin with a risc v linux header see next section we ll use a temporary file for the flattened device tree fdt since it s missing from armbian inside the armbian kernel image read the article inspecting the risc v linux images for star64 jh7110 sbc https lupyuen github io articles star64 what s inside the armbian linux kernel image let s look inside armbi root boot vmlinuz 5 15 0 starfive2 armbian kernel image https lupyuen github io images star64 kernel png see the riscv at 0x30 that s the magic number for the risc v linux image header boot image header in risc v linux https www kernel org doc html latest riscv boot image header html text u32 code0 executable code u32 code1 executable code u64 text offset image load offset little endian u64 image size effective image size little endian u64 flags kernel flags little endian u32 version version of this header u32 res1 0 reserved u64 res2 0 reserved u64 magic 0x5643534952 magic number little endian riscv u32 magic2 0x05435352 magic number 2 little endian rsc x05 u32 res3 reserved for pe coff offset this is how we decode the risc v linux header decode the risc v linux header https lupyuen github io articles star64 appendix decode the risc v linux header let s decompile the kernel image todo explain mz and the funny risc v instruction at the top decompile armbian kernel image with ghidra read the article inspecting the risc v linux images for star64 jh7110 sbc https lupyuen github io articles star64 we decompile the armbian linux kernel image with ghidra https github com nationalsecurityagency ghidra in ghidra create a new project click file import file select armbi root boot vmlinuz 5 15 0 starfive2 and enter these import options format raw binary language riscv rv64gc riscv le 64 rv64gc gcc starfive jh7110 has 4 rv64gc u74 application cores https doc en rvspace org jh7110 datasheet jh7110 ds c u74 quad core html options base address 0x44000000 based on the u boot configuration from above load the armbian linux kernel image into ghidra https lupyuen github io images star64 ghidra png load the armbian linux kernel image into ghidra https lupyuen github io images star64 ghidra2 png double click vmlinuz 5 15 0 starfive2 analyse the file with the default options ghidra displays the decompiled linux kernel disassembled linux kernel in ghidra https lupyuen github io images star64 ghidra3 png at address 0x4400 0002 we see a jump to fun 440010c8 text load 13 into register s4 li s4 0xd jump to actual boot code j fun 440010c8 double click fun 440010c8 to see the linux boot code linux boot code in ghidra https lupyuen github io images star64 ghidra4 png todo explain mz and the funny risc v instruction at the top todo where is the source file todo any interesting csr instructions serial console on star64 read the article booting risc v linux on star64 jh7110 sbc https lupyuen github io articles linux to access the serial console we connect a usb serial adapter https pine64 com product serial console woodpecker edition to star64 star64 jh7110 risc v sbc with woodpecker usb serial adapter https lupyuen github io images linux title jpg according to star64 schematic https files pine64 org doc star64 star64 schematic v1 1 20230504 pdf uart0 tx and rx gpio 5 and 6 are connected to the pi gpio header pins 8 and 10 thus we connect these pins star64 gpio header usb serial adapter https pine64 com product serial console woodpecker edition wire colour pin 6 gnd gnd brown pin 8 tx rx red pin 10 rx tx orange set the voltage jumper to 3v3 instead of 5v pine64 woodpecker serial adapter https lupyuen github io images star64 uart3 jpg on our computer connect to the usb serial port at 115 2 kbps bash screen dev ttyusb0 115200 power up star64 the dip switches for gpio 0 and 1 default to low and low so star64 should boot from flash memory which has the u boot bootloader inside dip switch labels are inverted on actually means low https wiki pine64 org wiki star64 prototype bringup notes dip switches for gpio 0 and 1 are set to low and low https lupyuen github io images star64 uart2 jpg we ll see this u boot bootloader log todo explain opensbi https www thegoodpenguin co uk blog an overview of opensbi star64 u boot bootloader log read the article booting risc v linux on star64 jh7110 sbc https lupyuen github io articles linux here s the log for u boot bootloader on star64 without microsd card u boot bootloader log https lupyuen github io images star64 opensbi jpg text u boot spl 2021 10 jan 19 2023 04 09 41 0800 ddr version dc2e84f0 trying to boot from spi opensbi v1 2 platform name starfive visionfive v2 platform features medeleg platform hart count 5 platform ipi device aclint mswi platform timer device aclint mtimer 4000000hz platform console device uart8250 platform hsm device jh7110 hsm platform pmu device platform reboot device pm reset platform shutdown device pm reset firmware base 0x40000000 firmware size 288 kb runtime sbi version 1 0 domain0 name root domain0 boot hart 1 domain0 harts 0 1 2 3 4 domain0 region00 0x0000000002000000 0x000000000200ffff i domain0 region01 0x0000000040000000 0x000000004007ffff domain0 region02 0x0000000000000000 0xffffffffffffffff r w x domain0 next address 0x0000000040200000 domain0 next arg1 0x0000000042200000 domain0 next mode s mode domain0 sysreset yes boot hart id 1 boot hart domain root boot hart priv version v1 11 boot hart base isa rv64imafdcbx boot hart isa extensions none boot hart pmp count 8 boot hart pmp granularity 4096 boot hart pmp address bits 34 boot hart mhpm count 2 boot hart mideleg 0x0000000000000222 boot hart medeleg 0x000000000000b109 u boot 2021 10 jan 19 2023 04 09 41 0800 build jenkins github visionfive2 6 cpu rv64imacu model starfive visionfive v2 dram 8 gib mmc sdio0 16010000 0 sdio1 16020000 1 loading environment from spiflash sf detected gd25lq128 with page size 256 bytes erase size 4 kib total 16 mib warning bad crc using default environment starfive eeprom format v2 eeprom info vendor pine64 product full sn star64v1 2310 d008e000 00000003 data version 0x2 pcb revision 0xc1 bom revision a ethernet mac0 address 6c cf 39 00 75 5d ethernet mac1 address 6c cf 39 00 75 5e eeprom info in serial 10000000 out serial 10000000 err serial 10000000 model starfive visionfive v2 net eth0 ethernet 16030000 eth1 ethernet 16040000 card did not respond to voltage select 110 card did not respond to voltage select 110 bootmode flash device 0 card did not respond to voltage select 110 hit any key to stop autoboot 2 1 0 card did not respond to voltage select 110 couldn t find partition mmc 0 3 can t set block device importing environment from mmc0 warning input data exceeds 1048576 bytes truncated info input data size 1048578 0x100002 card did not respond to voltage select 110 couldn t find partition mmc 1 2 can t set block device warning defaulting to text format error boot2 not defined card did not respond to voltage select 110 ethernet 16030000 waiting for phy auto negotiation to complete timeout phy startup failed 110failed 110ethernet 16040000 waiting for phy auto negotiation to complete timeout phy startup failed 110failed 110ethernet 16030000 waiting for phy auto negotiation to complete timeout phy startup failed 110failed 110ethernet 16040000 waiting for phy auto negotiation to complete timeout phy startup failed 110failed 110starfive starfive which is ok because we haven t inserted a microsd card u boot commands for star64 here are the u boot commands text starfive help alias for help base print or set address offset bdinfo print board info structure blkcache block cache diagnostics and control boot boot default i e run bootcmd bootd boot default i e run bootcmd bootefi boots an efi payload from memory bootelf boot from an elf image in memory booti boot linux kernel image format from memory bootm boot application image from memory bootp boot image via network using bootp tftp protocol bootvx boot vxworks from an elf image cmp memory compare config print config coninfo print console devices and information cp memory copy cpu display information about cpus crc32 checksum calculation dhcp boot image via network using dhcp tftp protocol dm driver model low level access echo echo args to console editenv edit environment variable eeprom eeprom sub system efidebug configure uefi environment env environment handling commands erase erase flash memory eraseenv erase environment variables from persistent storage exit exit script ext2load load binary file from a ext2 filesystem ext2ls list files in a directory default ext4load load binary file from a ext4 filesystem ext4ls list files in a directory default ext4size determine a file s size ext4write create a file in the root directory false do nothing unsuccessfully fatinfo print information about filesystem fatload load binary file from a dos filesystem fatls list files in a directory default fatmkdir create a directory fatrm delete a file fatsize determine a file s size fatwrite write file into a dos filesystem fdt flattened device tree utility commands flinfo print flash memory information fstype look up a filesystem type fstypes list supported filesystem types fsuuid look up a filesystem uuid go start application at address addr gpio query and control gpio pins gpt guid partition table gzwrite unzip and write memory to block device help print command description usage i2c i2c sub system iminfo print header information for application image imxtract extract a part of a multi image itest return true false on integer compare ln create a symbolic link load load binary file from a filesystem loadb load binary file over serial line kermit mode loads load s record file over serial line loadx load binary file over serial line xmodem mode loady load binary file over serial line ymodem mode log log system loop infinite loop on address range ls list files in a directory default lzmadec lzma uncompress a memory region mac display and program the system id and mac addresses in eeprom md memory display misc access miscellaneous devices with misc uclass driver apis mm memory modify auto incrementing address mmc mmc sub system mmcinfo display mmc info mw memory write fill net net sub system nfs boot image via network using nfs protocol nm memory modify constant address panic panic with optional message part disk partition related commands ping send icmp echo request to network host pinmux show pin controller muxing printenv print environment variables protect enable or disable flash write protection random fill memory with random pattern reset perform reset of the cpu run run commands in an environment variable save save file to a filesystem saveenv save environment variables to persistent storage setenv set environment variables setexpr set environment variable as the result of eval expression sf spi flash sub system showvar print local hushshell variables size determine a file s size sleep delay execution for some time source run script from memory sysboot command to get and boot from syslinux files test minimal test like bin sh tftpboot boot image via network using tftp protocol tftpput tftp put command for uploading files to a server true do nothing successfully unlz4 lz4 uncompress a memory region unzip unzip a memory region version print monitor compiler and linker version u boot settings for star64 here are the u boot settings text starfive printenv baudrate 115200 boot a script load devtype devnum distro bootpart scriptaddr prefix script source scriptaddr boot efi binary load devtype devnum distro bootpart kernel addr r efi boot bootriscv64 efi if fdt addr fdt addr r then bootefi kernel addr r fdt addr r else bootefi kernel addr r fdtcontroladdr fi boot efi bootmgr if fdt addr fdt addr r then bootefi bootmgr fdt addr r else bootefi bootmgr fi boot extlinux sysboot devtype devnum distro bootpart any scriptaddr prefix boot syslinux conf boot prefixes boot boot script dhcp boot scr uimg boot scripts boot scr uimg boot scr boot syslinux conf extlinux extlinux conf boot targets mmc0 dhcp bootargs console ttys0 115200 debug rootwait earlycon sbi bootcmd run load vf2 env run importbootenv run load distro uenv run boot2 run distro bootcmd bootcmd dhcp devtype dhcp if dhcp scriptaddr boot script dhcp then source scriptaddr fi setenv efi fdtfile fdtfile setenv efi old vci bootp vci setenv efi old arch bootp arch setenv bootp vci pxeclient arch 00027 undi 003000 setenv bootp arch 0x1b if dhcp kernel addr r then tftpboot fdt addr r dtb efi fdtfile if fdt addr fdt addr r then bootefi kernel addr r fdt addr r else bootefi kernel addr r fdtcontroladdr fi fi setenv bootp vci efi old vci setenv bootp arch efi old arch setenv efi fdtfile setenv efi old arch setenv efi old vci bootcmd distro run fdt loaddtb run fdt sizecheck run set fdt distro sysboot mmc fatbootpart fat c0000000 bootdir boot syslinux conf bootcmd mmc0 devnum 0 run mmc boot bootdelay 2 bootdir boot bootenv uenv txt bootmode flash bootpart 0 3 chip vision unkown chipa gmac set fdt set soc ethernet 16030000 ethernet phy 0 tx inverted 10 0x0 fdt set soc ethernet 16030000 ethernet phy 0 tx inverted 100 0x0 fdt set soc ethernet 16030000 ethernet phy 0 tx inverted 1000 0x0 fdt set soc ethernet 16030000 ethernet phy 0 tx delay sel 0x9 fdt set soc ethernet 16040000 ethernet phy 1 tx inverted 10 0x0 fdt set soc ethernet 16040000 ethernet phy 1 tx inverted 100 0x0 fdt set soc ethernet 16040000 ethernet phy 1 tx inverted 1000 0x0 fdt set soc ethernet 16040000 ethernet phy 1 tx delay sel 0x9 chipa set if test chip vision a then run chipa gmac set fi chipa set linux fdt addr fdt addr r run visionfive2 mem set run chipa set chipa set linux force fdt addr fdt addr r run visionfive2 mem set run chipa gmac set chipa set uboot fdt addr uboot fdt addr run chipa set chipa set uboot force fdt addr uboot fdt addr run chipa gmac set devnum 0 distro bootcmd for target in boot targets do run bootcmd target done distroloadaddr 0xb0000000 efi dtb prefixes dtb dtb current eth0addr 6c cf 39 00 75 5d eth1addr 6c cf 39 00 75 5e ethact ethernet 16030000 ethaddr 6c cf 39 00 75 5d ext4bootenv ext4load mmc bootpart loadaddr bootdir bootenv fatbootpart 1 2 fdt addr r 0x46000000 fdt high 0xffffffffffffffff fdt loaddtb fatload mmc fatbootpart fdt addr r bootdir dtbs fdtfile fdt addr fdt addr r fdt sizecheck fatsize mmc fatbootpart bootdir dtbs fdtfile fdtaddr fffc6aa0 fdtcontroladdr fffc6aa0 fdtfile starfive starfive visionfive2 dtb importbootenv echo importing environment from mmc devnum env import t loadaddr filesize initrd high 0xffffffffffffffff ipaddr 192 168 120 230 kernel addr r 0x40200000 load distro uenv fatload mmc fatbootpart distroloadaddr bootdir bootenv env import distroloadaddr 17c load efi dtb load devtype devnum distro bootpart fdt addr r prefix efi fdtfile load vf2 env fatload mmc bootpart loadaddr testenv loadaddr 0xa0000000 loadbootenv fatload mmc bootpart loadaddr bootenv memory addr 40000000 memory size 200000000 mmc boot if mmc dev devnum then devtype mmc run scan dev for boot part fi mmcbootenv run scan mmc dev setenv bootpart devnum mmcpart if mmc rescan then run loadbootenv run importbootenv run ext4bootenv run importbootenv if test n uenvcmd then echo running uenvcmd run uenvcmd fi fi mmcpart 3 netmask 255 255 255 0 partitions name loader1 start 17k size 1m type type guid gpt loader1 name loader2 size 4mb type type guid gpt loader2 name system size bootable type type guid gpt system preboot run chipa set uboot run mmcbootenv pxefile addr r 0x45900000 ramdisk addr r 0x46100000 scan dev for boot echo scanning devtype devnum distro bootpart for prefix in boot prefixes do run scan dev for extlinux run scan dev for scripts done run scan dev for efi scan dev for boot part part list devtype devnum bootable devplist env exists devplist setenv devplist 1 for distro bootpart in devplist do if fstype devtype devnum distro bootpart bootfstype then run scan dev for boot fi done setenv devplist scan dev for efi setenv efi fdtfile fdtfile for prefix in efi dtb prefixes do if test e devtype devnum distro bootpart prefix efi fdtfile then run load efi dtb fi done run boot efi bootmgr if test e devtype devnum distro bootpart efi boot bootriscv64 efi then echo found efi removable media binary efi boot bootriscv64 efi run boot efi binary echo efi load failed continuing fi setenv efi fdtfile scan dev for extlinux if test e devtype devnum distro bootpart prefix boot syslinux conf then echo found prefix boot syslinux conf run boot extlinux echo script failed continuing fi scan dev for scripts for script in boot scripts do if test e devtype devnum distro bootpart prefix script then echo found u boot script prefix script run boot a script echo script failed continuing fi done scan mmc dev if test bootmode flash then if mmc dev devnum then echo found device devnum else setenv devnum 0 mmc dev 0 fi fi echo bootmode bootmode device devnum scan sf for scripts devtype read scriptaddr script offset f script size f source scriptaddr echo script failed continuing script offset f 0x1fff000 script size f 0x1000 scriptaddr 0x43900000 serial star64v1 2310 d008e000 00000003 set fdt distro if test chip vision a then if test memory size 200000000 then run chipa gmac set run visionfive2 mem set fatwrite mmc fatbootpart fdt addr r bootdir dtbs fdtfile filesize else run chipa gmac set run visionfive2 mem set fatwrite mmc fatbootpart fdt addr r bootdir dtbs fdtfile filesize fi else run visionfive2 mem set fatwrite mmc fatbootpart fdt addr r bootdir dtbs fdtfile filesize fi sf boot if sf probe busnum then devtype sf run scan sf for scripts fi stderr serial 10000000 stdin serial 10000000 stdout serial 10000000 testenv vf2 uenv txt type guid gpt loader1 5b193300 fc78 40cd 8002 e86c45580b47 type guid gpt loader2 2e54b353 1271 4842 806f e436d6af6985 type guid gpt system 0fc63daf 8483 4772 8e79 3d69d8477de4 uboot fdt addr 0xfffc6aa0 ver u boot 2021 10 jan 19 2023 04 09 41 0800 visionfive2 mem set fdt memory memory addr memory size environment size 7246 65532 bytes starfive boot armbian on star64 read the article booting risc v linux on star64 jh7110 sbc https lupyuen github io articles linux let s boot armbian on star64 we download the armbian image for star64 armbian 23 8 lunar minimal https github com armbianro os releases download 23 8 0 trunk 56 armbian 23 8 0 trunk 56 star64 lunar edge 5 15 0 minimal img xz uncompress the xz write the img to a microsd card with balena etcher here s what happens when we boot the microsd card on star64 armbian boot log https gist github com lupyuen d73ace627318375fe20e90e4950f9c50 armbian fails to boot text found boot extlinux extlinux conf retrieving file boot extlinux extlinux conf 383 bytes read in 7 ms 52 7 kib s 1 6carmbian retrieving file boot uinitrd 10911538 bytes read in 466 ms 22 3 mib s retrieving file boot image 22040576 bytes read in 936 ms 22 5 mib s append root uuid 99f62df4 be35 475c 99ef 2ba3f74fe6b5 console ttys0 115200n8 console tty0 earlycon sbi rootflags data writeback stmmaceth chain mode 1 rw rw no console suspend consoleblank 0 fsck fix yes fsck repair yes net ifnames 0 splash plymouth ignore serial consoles retrieving file boot dtb starfive jh7110 star64 pine64 dtb failed to load boot dtb starfive jh7110 star64 pine64 dtb skipping armbian for failure retrieving fdt the flattened device tree fdt is missing boot dtb starfive jh7110 star64 pine64 dtb text ls volumes armbi root boot dtb 5 15 0 starfive2 starfive evb overlay jh7110 evb usbdevice dtb jh7110 evb can pdm pwmdac dtb jh7110 evb dtb jh7110 evb dvp rgb2hdmi dtb jh7110 fpga dtb jh7110 evb i2s ac108 dtb jh7110 visionfive v2 a10 dtb jh7110 evb pcie i2s sd dtb jh7110 visionfive v2 a11 dtb jh7110 evb spi uart2 dtb jh7110 visionfive v2 ac108 dtb jh7110 evb uart1 rgb2hdmi dtb jh7110 visionfive v2 wm8960 dtb jh7110 evb uart4 emmc spdif dtb jh7110 visionfive v2 dtb jh7110 evb uart5 pwm i2c tdm dtb vf2 overlay the missing device tree is noted in this pine64 forum post https forum pine64 org showthread php tid 18276 pid 117607 pid117607 so we might need to check back later for the official armbian image if it s fixed balbes150 suggests that we try this armbian image instead https forum pine64 org showthread php tid 18420 pid 118331 pid118331 boot yocto on star64 read the article booting risc v linux on star64 jh7110 sbc https lupyuen github io articles linux now we boot yocto on star64 we download the yocto minimal image for star64 star64 image minimal https pine64 my ho st 8443 star64 image minimal star64 1 2 wic bz2 uncompress the bz2 rename as img balena etcher won t work with bz2 files write the img to a microsd card with balena etcher here s what happens when we boot the microsd card on star64 yocto boot log https gist github com lupyuen b23edf50cecbee13e5aab3c0bae6c528 usernames and passwords are root pine64 pine64 pine64 source https github com fishwaldo meta pine64 usernames yep the yocto minimal image boots ok on star64 boot yocto plasma on star64 read the article booting risc v linux on star64 jh7110 sbc https lupyuen github io articles linux finally we boot yocto plasma on star64 we download the yocto plasma image for star64 star64 image plasma https pine64 my ho st 8443 star64 image plasma star64 1 2 wic bz2 uncompress the bz2 rename as img balena etcher won t work with bz2 files write the img to a microsd card with balena etcher when we boot the microsd card on star64 the plasma desktop environment runs ok on a hdmi display pic below usernames and passwords are root pine64 pine64 pine64 source https github com fishwaldo meta pine64 usernames yocto plasma on star64 https lupyuen github io images star64 plasma jpg nuttx prints to qemu console read the article apache nuttx rtos on risc v star64 jh7110 sbc https lupyuen github io articles nuttx2 our nuttx kernel will print to star64 serial console for debugging before that let s write some risc v assembly code to print to the qemu console earlier we ran nuttx on qemu emulator for 64 bit risc v 64 bit risc v with apache nuttx real time operating system https lupyuen github io articles riscv qemu emulates a 16550 uart port similar to star64 jh7110 what s the base address of qemu s uart port according to the nuttx configuration for qemu nsh64 defconfig https github com lupyuen2 wip pinephone nuttx blob star64 boards risc v qemu rv rv virt configs nsh64 defconfig l10 l16 text config 16550 addrwidth 0 config 16550 uart0 y config 16550 uart0 base 0x10000000 config 16550 uart0 clock 3686400 config 16550 uart0 irq 37 config 16550 uart0 serial console y config 16550 uart y base address of qemu s uart port is 0x1000 0000 same as star64 jh7110 yay how to print to the 16550 uart port let s check the 16550 uart driver in nuttx from uart 16550 c https github com apache nuttx blob master drivers serial uart 16550 c l1539 l1553 c name u16550 send description this method will send one byte on the uart static void u16550 send struct uart dev s dev int ch far struct u16550 s priv far struct u16550 s dev priv u16550 serialout priv uart thr offset uart datawidth t ch u16550 serialout is defined here https github com apache nuttx blob master drivers serial uart 16550 c l610 l624 to print a character the driver writes to the uart base address 0x1000 0000 at offset uart thr offset and we discover that uart thr offset https github com apache nuttx blob dc69b108b8e0547ecf6990207526c27aceaf1e2e include nuttx serial uart 16550 h l172 l200 is 0 c define uart thr incr 0 dlab 0 transmit holding register define uart thr offset config 16550 regincr uart thr incr so we can transmit to uart port by simply writing to 0x1000 0000 how convenient how to print to the qemu console let s do the printing in risc v assembly code so that we can debug the nuttx boot code from qemu rv head s https github com lupyuen2 wip pinephone nuttx blob star64 arch risc v src qemu rv qemu rv head s l71 l93 text load uart base address to register t0 li t0 0x10000000 load 1 to register t1 li t1 0x31 store byte from register t1 to uart base address offset 0 sb t1 0 t0 load 2 to register t1 li t1 0x32 store byte from register t1 to uart base address offset 0 sb t1 0 t0 load 3 to register t1 li t1 0x33 store byte from register t1 to uart base address offset 0 sb t1 0 t0 this prints 123 to the qemu console here s the output text qemu system riscv64 semihosting m virt aclint on cpu rv64 smp 8 bios none kernel nuttx nographic 123123123123123123112323 nuttshell nsh nuttx 12 0 3 nsh which is correct because qemu is running with 8 cpus yay nuttx prints to qemu console https lupyuen github io images riscv print png cody ai assistant https about sourcegraph com cody explains our risc v assembly code cody ai assistant explains our risc v assembly code https lupyuen github io images riscv cody1 png and offers to optimise our risc v assembly code cody ai assistant optimises our risc v assembly code https lupyuen github io images riscv cody2 png but the output is incorrect text qemu system riscv64 semihosting m virt aclint on cpu rv64 smp 8 bios none kernel nuttx nographic 11111111 nuttshell nsh nuttx 12 0 3 nsh the correct output is 123123123123123123112323 because of the 8 cpus uart base address for star64 read the article apache nuttx rtos on risc v star64 jh7110 sbc https lupyuen github io articles nuttx2 we ll take the uart assembly code from the previous section and run on star64 jh7110 so we can troubleshoot the nuttx boot code does star64 jh7110 use a 16550 uart controller like qemu according to the jh7110 uart developing guide https doc en rvspace org visionfive2 dg uart jh7110 sdk function layer html star64 jh7110 uses the 8250 uart controller which is compatible with qemu s 16550 uart controller https en wikipedia org wiki 16550 uart so our uart assembly code for qemu will run on star64 what s the uart base address for star64 jh7110 based on jh7110 system memory map https doc en rvspace org jh7110 trm jh7110 trm system memory map html uart0 is at 0x1000 0000 also from the jh7110 uart device tree https doc en rvspace org visionfive2 dg uart jh7110 sdk general uart controller html uart register base address is 0x1000 0000 with range 0x10000 jh7110 uart datasheet https doc en rvspace org jh7110 datasheet jh7110 ds uart html isn t that the same uart base address as qemu let s check the uart base address in nuttx for qemu from nsh64 defconfig https github com lupyuen2 wip pinephone nuttx blob star64 boards risc v qemu rv rv virt configs nsh64 defconfig l10 l16 text config 16550 addrwidth 0 config 16550 uart0 y config 16550 uart0 base 0x10000000 config 16550 uart0 clock 3686400 config 16550 uart0 irq 37 config 16550 uart0 serial console y config 16550 uart y nuttx uart base address is 0x1000 0000 the exact same uart base address for qemu and star64 so no changes needed our uart assembly code will run on qemu and star64 yay risc v linux kernel header read the article apache nuttx rtos on risc v star64 jh7110 sbc https lupyuen github io articles nuttx2 for u boot bootloader to boot nuttx we need to embed the risc v linux kernel header inside the kernel image https lupyuen github io articles star64 inside the kernel image this is how we decode the risc v linux header decode the risc v linux header https lupyuen github io articles star64 appendix decode the risc v linux header we copy the arm64 linux header from arm64 head s https github com lupyuen2 wip pinephone nuttx blob star64 arch arm64 src common arm64 head s l79 l118 and tweak for risc v linux header like this qemu rv head s https github com lupyuen2 wip pinephone nuttx blob star64 arch risc v src qemu rv qemu rv head s l42 l75 text start begin test do not modify image header expected by linux bootloaders this li instruction has no meaningful effect except that its opcode forms the magic mz signature of a pe coff file that is required for uefi applications some bootloaders check the magic mz to see if the image is a valid linux image but modifying the bootloader is unnecessary unless we need to do a customized secure boot so we just put mz in the header to make the bootloader happy c li s4 13 magic signature mz 2 bytes j real start jump to kernel start 2 bytes long 0 executable code padded to 8 bytes quad 0x200000 image load offset from start of ram todo e initstack start quad 171644 effective size of kernel image little endian quad 0x0 kernel flags little endian long 0x2 version of this header long 0 reserved quad 0 reserved ascii riscv x00 x00 x00 magic number riscv 8 bytes ascii rsc x05 magic number 2 rsc x05 4 bytes long 0 reserved for pe coff offset real start load uart base address to register t0 li t0 0x10000000 note that image load offset must be 0x20 0000 text quad 0x200000 image load offset from start of ram that s because our kernel starts at 0x4020 0000 here s the assembled output text 0000000040200000 start li s4 0xd magic signature mz 2 bytes 40200000 5a4d li s4 13 j real start jump to kernel start 2 bytes 40200002 a83d j 40200040 real start 40200004 0000 unimp 40200006 0000 unimp 40200008 0000 unimp 4020000a 0020 addi s0 sp 8 4020000c 0000 unimp 4020000e 0000 unimp 40200010 9e7c 0x9e7c 40200012 0002 c slli64 zero 40200020 0002 c slli64 zero 4020002e 0000 unimp 40200030 4952 lw s2 20 sp 40200032 00564353 fadd s ft6 fa2 ft5 rmm 40200036 0000 unimp 40200038 5352 lw t1 52 sp 4020003a 00000543 fmadd s fa0 ft0 ft0 ft0 rne 0000000040200040 real start check that the lengths and offsets match the risc v linux header format decode the risc v linux header https lupyuen github io articles star64 appendix decode the risc v linux header and our risc v boot code tested ok with qemu set start address of nuttx kernel read the article apache nuttx rtos on risc v star64 jh7110 sbc https lupyuen github io articles nuttx2 earlier we saw that star64 s u boot bootloader will load linux kernels into ram at address 0x4020 0000 armbian image for star64 https lupyuen github io articles star64 armbian image for star64 yocto image for star64 https lupyuen github io articles star64 yocto image for star64 to boot nuttx on star64 let s set the start address of the nuttx kernel to 0x4020 0000 from nsh64 defconfig https github com lupyuen2 wip pinephone nuttx blob star64 boards risc v qemu rv rv virt configs nsh64 defconfig l56 l57 text config ram size 33554432 config ram start 0x80000000 we changed the above nuttx build config to 0x40200000 we also updated the linker script ld script https github com lupyuen2 wip pinephone nuttx blob star64 boards risc v qemu rv rv virt scripts ld script l21 l26 text sections previously 0x80000000 0x40200000 text remember to change this if building for nuttx kernel mode ld kernel64 script https github com lupyuen2 wip pinephone nuttx blob star64 boards risc v qemu rv rv virt scripts ld kernel64 script l21 l51 text memory previously 0x80000000 kflash rx origin 0x40200000 length 2048k w cache previously 0x80200000 ksram rwx origin 0x40400000 length 2048k w cache previously 0x80400000 pgram rwx origin 0x40600000 length 4096k w cache sections previously 0x80000000 0x40200000 text which should match knsh64 defconfig https github com lupyuen2 wip pinephone nuttx blob star64 boards risc v qemu rv rv virt configs knsh64 defconfig text config arch pgpool pbase 0x40600000 config arch pgpool vbase 0x40600000 todo fix config ram size config ram size 1048576 config ram start 0x40200000 risc v disassembly of nuttx kernel shows that the start address is correct text 0000000040200000 start li s4 0xd magic signature mz 2 bytes 40200000 5a4d li s4 13 j real start jump to kernel start 2 bytes 40200002 a83d j 40200040 real start we re ready to boot nuttx on star64 boot nuttx on star64 read the article apache nuttx rtos on risc v star64 jh7110 sbc https lupyuen github io articles nuttx2 let s boot nuttx on star64 we compile nuttx for 64 bit risc v qemu https lupyuen github io articles riscv appendix build apache nuttx rtos for 64 bit risc v qemu with these tweaks nuttx prints to qemu console https github com lupyuen nuttx star64 nuttx prints to qemu console uart base address for star64 https github com lupyuen nuttx star64 uart base address for star64 risc v linux kernel header https github com lupyuen nuttx star64 risc v linux kernel header set start address of nuttx kernel https github com lupyuen nuttx star64 set start address of nuttx kernel for the microsd image we pick this armbian image for star64 https www armbian com star64 armbian 23 8 lunar for star64 minimal https github com armbianro os releases download 23 8 0 trunk 56 armbian 23 8 0 trunk 56 star64 lunar edge 5 15 0 minimal img xz write the armbian image to a microsd card with balena etcher we fix the missing device tree https lupyuen github io articles star64 armbian image for star64 bash fix the missing device tree sudo chmod go w run media user armbi root boot sudo chmod go w run media user armbi root boot dtb starfive cp run media user armbi root boot dtb starfive jh7110 visionfive v2 dtb run media user armbi root boot dtb starfive jh7110 star64 pine64 dtb then we delete the sym link boot image and copy the nuttx binary image nuttx bin to boot image bash we assume that nuttx contains the nuttx elf image export the nuttx binary image to nuttx bin riscv64 unknown elf objcopy o binary nuttx nuttx bin delete armbian kernel boot image rm run media user armbi root boot image copy nuttx bin to armbian kernel boot image cp nuttx bin run media user armbi root boot image insert the microsd card into star64 and power up nuttx boots with 123 yay which is printed by our boot code https github com lupyuen nuttx star64 nuttx prints to qemu console text starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123 unhandled exception illegal instruction boot nuttx on star64 https lupyuen github io images star64 nuttx png here s the complete log text retrieving file boot extlinux extlinux conf 383 bytes read in 7 ms 52 7 kib s 1 6carmbian retrieving file boot uinitrd 10911538 bytes read in 466 ms 22 3 mib s retrieving file boot image 163201 bytes read in 14 ms 11 1 mib s append root uuid 99f62df4 be35 475c 99ef 2ba3f74fe6b5 console ttys0 115200n8 console tty0 earlycon sbi rootflags data writeback stmmaceth chain mode 1 rw rw no console suspend consoleblank 0 fsck fix yes fsck repair yes net ifnames 0 splash plymouth ignore serial consoles retrieving file boot dtb starfive jh7110 star64 pine64 dtb 50235 bytes read in 14 ms 3 4 mib s loading init ramdisk from legacy image at 46100000 image name uinitrd image type risc v linux ramdisk image gzip compressed data size 10911474 bytes 10 4 mib load address 00000000 entry point 00000000 verifying checksum ok flattened device tree blob at 46000000 booting using the fdt blob at 0x46000000 using device tree in place at 0000000046000000 end 000000004600f43a starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123unhandled exception illegal instruction epc 000000004020005c ra 00000000fff471c6 tval 00000000f1402573 epc ffffffff804ba05c ra 00000000402011c6 reloc adjusted sp 00000000ff733630 gp 00000000ff735e00 tp 0000000000000001 t0 0000000010000000 t1 0000000000000033 t2 7869662e6b637366 s0 0000000000000400 s1 00000000ffff1428 a0 0000000000000001 a1 0000000046000000 a2 0000000000000600 a3 0000000000004000 a4 0000000000000000 a5 0000000040200000 a6 00000000fffd5708 a7 0000000000000000 s2 00000000fff47194 s3 0000000000000003 s4 fffffffffffffff3 s5 00000000fffdbb50 s6 0000000000000000 s7 0000000000000000 s8 00000000fff47194 s9 0000000000000002 s10 0000000000000000 s11 0000000000000000 t3 0000000000000023 t4 000000004600b5cc t5 000000000000ff00 t6 000000004600b5cc code 0313 0320 8023 0062 0313 0330 8023 0062 2573 f140 resetting reset not supported yet error please reset the board why does nuttx crash at 4020005c see the next section cody ai assistant tries to explain our risc v exception https lupyuen github io images star64 exception jpg cody ai assistant https about sourcegraph com cody tries to explain our risc v exception nuttx fails to get hart id read the article apache nuttx rtos on risc v star64 jh7110 sbc https lupyuen github io articles nuttx2 earlier we saw nuttx crashing when booting on star64 text starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123 unhandled exception illegal instruction epc 000000004020005c ra 00000000fff471c6 tval 00000000f1402573 why did nuttx crash at 4020005c here s our risc v boot code from qemu rv head s https github com lupyuen2 wip pinephone nuttx blob ed09c34532ee7c51ac2da816cd6cf0adcce336e6 arch risc v src qemu rv qemu rv head s l92 l103 text nuttx arch risc v src chip qemu rv head s 95 load mhartid cpuid csrr a0 mhartid 4020005c f1402573 csrr a0 mhartid nuttx tries loads the cpu id or hardware thread hart id from the risc v control and status register csr explained here https lupyuen github io articles riscv get cpu id but it fails because we don t have sufficient privilege to access the hart id risc v privilege levels read the article apache nuttx rtos on risc v star64 jh7110 sbc https lupyuen github io articles nuttx2 risc v runs at 3 privilege levels m machine mode most powerful s supervisor mode less powerful u user mode least powerful nuttx runs at supervisor mode which doesn t allow access to machine mode csr registers https five embeddev com riscv isa manual latest machine html including hart id https five embeddev com riscv isa manual latest machine html hart id register mhartid the m in mhartid signifies that it s a machine mode register risc v privilege levels https lupyuen github io images nuttx2 privilege jpg what runs in machine mode opensbi https www thegoodpenguin co uk blog an overview of opensbi supervisor binary interface is the first thing that boots on star64 it runs at machine mode and starts the u boot bootloader see the risc v sbi spec https github com riscv non isa riscv sbi doc blob master riscv sbi pdf what about u boot bootloader u boot bootloader runs in supervisor mode and starts nuttx also in supervisor mode so opensbi is the only thing that runs in machine mode and can access the machine level registers qemu doesn t have this problem because qemu runs everything in super powerful machine mode nuttx qemu runs in machine mode https lupyuen github io images nuttx2 privilege2 jpg nuttx needs to fetch the hart id with a different recipe downgrade nuttx to supervisor mode read the article apache nuttx rtos on risc v star64 jh7110 sbc https lupyuen github io articles nuttx2 how to get the hart id from opensbi let s refer to the linux boot code linux arch riscv kernel head s https github com torvalds linux blob master arch riscv kernel head s tip config riscv m mode is false and config efi is true from linux blob master arch riscv kernel head s https github com torvalds linux blob master arch riscv kernel head s l292 l295 c save hart id and dtb physical address mv s0 a0 mv s1 a1 here we see that u boot or opensbi https github com riscv non isa riscv sbi doc blob master riscv sbi adoc function hart start fid 0 will pass 2 arguments when it starts our kernel register a0 hart id register a1 ram address of device tree so we ll simply read the hart id from register a0 and ignore a1 we ll remove csrr a0 mhartid what are the actual values of registers a0 and a1 thanks to our earlier crash dump https github com lupyuen nuttx star64 boot nuttx on star64 we know the actual values of a0 and a1 text sp 00000000ff733630 gp 00000000ff735e00 tp 0000000000000001 t0 0000000010000000 t1 0000000000000033 t2 7869662e6b637366 s0 0000000000000400 s1 00000000ffff1428 a0 0000000000000001 a1 0000000046000000 a2 0000000000000600 a3 0000000000004000 this says that hart id is 1 register a0 ram address of device tree is 0x4600 0000 register a1 yep looks correct but we ll subtract 1 from register a0 because nuttx expects hart id to start with 0 what about other csr instructions in our nuttx boot code we change the machine level m registers to supervisor level s registers to disable interrupts change mie to sie https five embeddev com riscv isa manual latest supervisor html supervisor interrupt registers sip and sie text disable all interrupts i e timer external in mie csrw mie zero source https lupyuen github io articles riscv disable interrupts to load interrupt vector table change mtvec to stvec https five embeddev com riscv isa manual latest supervisor html supervisor trap vector base address register stvec text load address of interrupt vector table csrw mtvec t0 source https lupyuen github io articles riscv load interrupt vector the linux boot code looks confusing what are csr ie and csr ip text mask all interrupts csrw csr ie zero csrw csr ip zero source https github com torvalds linux blob master arch riscv kernel head s l195 l200 that s because the linux boot code will work for machine level and supervisor level here s how csr ie and csr ip are mapped to the m and s csr registers remember config riscv m mode is false for nuttx text ifdef config riscv m mode use machine level csr registers define csr ie csr mie define csr ip csr mip else use supervisor level csr registers define csr ie csr sie define csr ip csr sip endif config riscv m mode source https github com torvalds linux blob master arch riscv include asm csr h l391 l444 let s fix the boot code fix the nuttx boot code read the article apache nuttx rtos on risc v star64 jh7110 sbc https lupyuen github io articles nuttx2 from the previous section we identified these fixes for the nuttx boot code 1 remove csrr a0 mhartid because opensbi will pass hart id in register a0 subtract 1 from register a0 because nuttx expects hart id to start with 0 1 to disable interrupts change mie to sie https five embeddev com riscv isa manual latest supervisor html supervisor interrupt registers sip and sie 1 to load interrupt vector table change mtvec to stvec https five embeddev com riscv isa manual latest supervisor html supervisor trap vector base address register stvec here s the updated boot code and our analysis qemu rv head s https github com lupyuen2 wip pinephone nuttx blob star64 arch risc v src qemu rv qemu rv head s text real start load mhartid cpuid previously csrr a0 mhartid we assume that opensbi has passed hart id value 1 in register a0 but nuttx expects hart id to start at 0 so we subtract 1 addi a0 a0 1 print the hart id addi t1 a0 0x30 store byte from register t1 to uart base address offset 0 sb t1 0 t0 if hart id is 0 set stack pointer to the idle thread stack text set stack pointer to the idle thread stack bnez a0 1f la sp qemu rv idlestack top j 2f if hart id is 1 2 3 validate the hart id must be less than number of cpus compute the stack base address based on g cpu basestack and hart id set the stack pointer to the computed stack base address text 1 load the number of cpus that the kernel supports ifdef config smp li t1 config smp ncpus else li t1 1 endif if a0 mhartid t1 the number of cpus stop here blt a0 t1 3f csrw sie zero previously csrw mie zero wfi 3 to get g cpu basestack mhartid must get g cpu basestack first la t0 g cpu basestack offset pointer width hart id ifdef config arch rv32 slli t1 a0 2 else slli t1 a0 3 endif add t0 t0 t1 load idle stack base to sp regload sp 0 t0 sp stack top sp idle stack size xcptcontext size note reserve some space used by up initial state since we are already running and using the per cpu idle stack li t0 stack align up config idlethread stacksize xcptcontext size add sp sp t0 for all hart ids disable interrupts load the interrupt vector table jump to qemu rv start 2 disable all interrupts i e timer external in mie csrw sie zero previously csrw mie zero don t load the interrupt vector table use opensbi for crash logging la t0 trap vec csrw stvec t0 previously csrw mtvec t0 jump to qemu rv start jal x1 qemu rv start we shouldn t return from start note that we don t load the interrupt vector table because we ll use opensbi for crash logging like when we hit m mode instructions what happens when we run this hart id is now 0 which is correct text starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123067 but qemu rv start hangs why text print 7 li t0 0x10000000 li t1 0x37 sb t1 0 t0 jump to qemu rv start jal x1 qemu rv start let s trace qemu rv start boot from network with u boot and tftp read the article star64 jh7110 risc v sbc boot from network with u boot and tftp https lupyuen github io articles tftp we really should configure u boot bootloader to load the kernel image over the network via tftp over udp https en wikipedia org wiki trivial file transfer protocol because testing nuttx by swapping microsd card is getting so tiresome here s how boot from network with u boot and tftp https lupyuen github io images tftp flow jpg setup tftp server first we set up a tftp server with tftpd https crates io crates tftpd bash cargo install tftpd mkdir home tftproot sudo tftpd i 0 0 0 0 p 69 d home tftproot sudo because port 69 is a privileged low port tftp server https crates io crates tftp server won t work it only supports localhost we should see text running tftp server on 0 0 0 0 69 in home tftproot sending a txt to 127 0 0 1 57125 sent a txt to 127 0 0 1 57125 sending a txt to 192 168 x x 33499 sent a txt to 192 168 x x 33499 let s test the tftp server bash echo test123 home tftproot a txt curl v tftp 127 0 0 1 a txt curl v tftp 192 168 x x a txt localhost won t work because of ipv6 i think we should see text curl v tftp 192 168 x x a txt trying 192 168 x x 69 getpeername failed with errno 107 transport endpoint is not connected connected to 192 168 x x port 69 0 getpeername failed with errno 107 transport endpoint is not connected set timeouts for state 0 total 300000 retry 6 maxtry 50 got option tsize value 8 tsize parsed from oack 8 got option blksize value 512 blksize parsed from oack 512 requested 512 got option timeout value 6 connected for receive set timeouts for state 1 total 0 retry 72 maxtry 50 test123 closing connection 0 if it fails text curl v tftp 192 168 x x a txt trying 192 168 x x 69 getpeername failed with errno 107 transport endpoint is not connected connected to 192 168 x x port 69 0 getpeername failed with errno 107 transport endpoint is not connected set timeouts for state 0 total 300000 retry 6 maxtry 50 in the olden days we would actually do this text tftp 127 0 0 1 tftp get a txt received 8 bytes in 0 0 seconds tftp quit just like ftp copy nuttx image to tftp server next we copy the nuttx image and device tree to the tftp folder bash copy the device tree from armbian microsd cp run media user armbi root boot dtb starfive jh7110 visionfive v2 dtb jh7110 star64 pine64 dtb copy nuttx binary image and device tree to tftp folder nuttx bin comes from here https github com lupyuen2 wip pinephone nuttx releases tag star64 0 0 1 cp nuttx bin home tftproot image cp jh7110 star64 pine64 dtb home tftproot test nuttx binary image and device tree over tftp curl v tftp 192 168 x x image curl v tftp 192 168 x x jh7110 star64 pine64 dtb we should see warning binary output can mess up your terminal use output to tell warning curl to output it to your terminal anyway or consider output warning file to save to a file test u boot with tftp now we boot star64 jh7110 sbc and test the tftp commands connect star64 sbc to the ethernet wired network and power up star64 fails to boot over the network because we don t have a bootp server https en wikipedia org wiki bootstrap protocol or dhcp tftp combo server but that s ok text ethernet 16030000 waiting for phy auto negotiation to complete done bootp broadcast 1 unhandled dhcp option in offer ack 43 unhandled dhcp option in offer ack 43 dhcp client bound to address 192 168 x x 351 ms using ethernet 16030000 device tftp from server 192 168 x x our ip address is 192 168 x x filename boot scr uimg load address 0x43900000 loading tftp server died starting again bootp broadcast 1 unhandled dhcp option in offer ack 43 unhandled dhcp option in offer ack 43 dhcp client bound to address 192 168 x x 576 ms using ethernet 16030000 device tftp from server 192 168 x x our ip address is 192 168 x x filename boot scr uimg load address 0x40200000 loading tftp server died starting again starfive source https github com lupyuen nuttx star64 u boot bootloader log for tftp run these commands bash set the tftp server ip setenv tftp server 192 168 x x load the nuttx image from tftp server kernel addr r 0x40200000 tftp server 192 168 x x tftpboot kernel addr r tftp server image load the device tree from tftp server fdt addr r 0x46000000 tftp server 192 168 x x tftpboot fdt addr r tftp server jh7110 star64 pine64 dtb set the ram address of device tree fdt addr r 0x46000000 fdt addr fdt addr r boot the nuttx image with the device tree kernel addr r 0x40200000 fdt addr r 0x46000000 booti kernel addr r fdt addr r inspired by this article https community arm com oss platforms w docs 495 tftp remote network kernel using u boot we should see text starfive setenv tftp server 192 168 x x starfive tftpboot kernel addr r tftp server image using ethernet 16030000 device tftp from server 192 168 x x our ip address is 192 168 x x filename image load address 0x40200000 loading t 221 7 kib s done bytes transferred 2097832 2002a8 hex starfive tftpboot fdt addr r tftp server jh7110 star64 pine64 dtb using ethernet 16030000 device tftp from server 192 168 x x our ip address is 192 168 x x filename jh7110 star64 pine64 dtb load address 0x46000000 loading 374 kib s done bytes transferred 50235 c43b hex starfive fdt addr fdt addr r starfive booti kernel addr r fdt addr r flattened device tree blob at 46000000 booting using the fdt blob at 0x46000000 using device tree in place at 0000000046000000 end 000000004600f43a starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123067dfaghbc source https github com lupyuen nuttx star64 u boot bootloader log for tftp configure u boot for tftp let s configure u boot so that it will boot from tftp every time we power up bash remember the tftp server ip setenv tftp server 192 168 x x check that it s correct printenv tftp server save it for future reboots saveenv add the boot command for tftp setenv bootcmd tftp if tftpboot kernel addr r tftp server image then if tftpboot fdt addr r tftp server jh7110 star64 pine64 dtb then if fdt addr fdt addr r then booti kernel addr r fdt addr r fi fi fi check that it s correct printenv bootcmd tftp save it for future reboots saveenv test the boot command for tftp run bootcmd tftp remember the original boot targets setenv orig boot targets boot targets should show mmc0 dhcp printenv boot targets save it for future reboots saveenv add tftp to the boot targets setenv boot targets boot targets tftp should show mmc0 dhcp tftp printenv boot targets save it for future reboots saveenv bootcmd tftp expands to bash load the nuttx image from tftp server kernel addr r 0x40200000 tftp server 192 168 x x if tftpboot kernel addr r tftp server image then load the device tree from tftp server fdt addr r 0x46000000 if tftpboot fdt addr r tftp server jh7110 star64 pine64 dtb then set the ram address of device tree fdt addr r 0x46000000 if fdt addr fdt addr r then boot the nuttx image with the device tree kernel addr r 0x40200000 fdt addr r 0x46000000 booti kernel addr r fdt addr r fi fi fi from here https community arm com oss platforms w docs 495 tftp remote network kernel using u boot this is a persistent change i e the device will boot via tftp on every power up to revert back to the default boot behaviour bash restore the boot targets setenv boot targets orig boot targets should show mmc0 dhcp printenv boot targets save it for future reboots saveenv with network boot running we re now ready for automated testing of apache nuttx rtos on star64 sbc though we might need a smart power plug to power cycle our sbc ikea tr dfri https www ikea com sg en p tradfri control outlet kit smart 10364797 and dirigera https www ikea com sg en p dirigera hub for smart products white smart 50503409 via home assistant api https gist github com lupyuen 01cff0d4ca225984ca8fd0d999d7c76d pic below home assistant controls google home and potentially smart plugs https lupyuen github io images tftp home png u boot commands for network boot how does it work bootcmd is now text bootcmd run load vf2 env run importbootenv run load distro uenv run boot2 run distro bootcmd load vf2 env fatload mmc bootpart loadaddr testenv importbootenv echo importing environment from mmc devnum env import t loadaddr filesize load distro uenv fatload mmc fatbootpart distroloadaddr bootdir bootenv env import distroloadaddr 17c boot2 not defined comes from boot vf2 uenv txt bootcmd calls distro bootcmd which runs bootcmd mmc0 and bootcmd dhcp text distro bootcmd for target in boot targets do run bootcmd target done boot targets mmc0 dhcp bootcmd mmc0 devnum 0 run mmc boot bootcmd distro run fdt loaddtb run fdt sizecheck run set fdt distro sysboot mmc fatbootpart fat c0000000 bootdir boot syslinux conf bootcmd dhcp is text bootcmd dhcp devtype dhcp if dhcp scriptaddr boot script dhcp then source scriptaddr fi setenv efi fdtfile fdtfile setenv efi old vci bootp vci setenv efi old arch bootp arch setenv bootp vci pxeclient arch 00027 undi 003000 setenv bootp arch 0x1b if dhcp kernel addr r then tftpboot fdt addr r dtb efi fdtfile if fdt addr fdt addr r then bootefi kernel addr r fdt addr r else bootefi kernel addr r fdtcontroladdr fi fi setenv bootp vci efi old vci setenv bootp arch efi old arch setenv efi fdtfile setenv efi old arch setenv efi old vci which expands to bash devtype dhcp load the boot script from dhcp tftp server scriptaddr 0x43900000 boot script dhcp boot scr uimg if dhcp scriptaddr boot script dhcp then source scriptaddr fi set the efi variables fdtfile starfive starfive visionfive2 dtb setenv efi fdtfile fdtfile setenv efi old vci bootp vci setenv efi old arch bootp arch setenv bootp vci pxeclient arch 00027 undi 003000 setenv bootp arch 0x1b load the kernel image from dhcp tftp server kernel addr r 0x40200000 if dhcp kernel addr r then load the device tree from the dhcp tftp server fdt addr r 0x46000000 efi fdtfile starfive starfive visionfive2 dtb tftpboot fdt addr r dtb efi fdtfile set the ram address of device tree fdt addr r 0x46000000 if fdt addr fdt addr r then boot the efi kernel image fdt addr r 0x46000000 bootefi kernel addr r fdt addr r else boot the efi kernel image fdtcontroladdr fffc6aa0 bootefi kernel addr r fdtcontroladdr fi fi unset the efi variables setenv bootp vci efi old vci setenv bootp arch efi old arch setenv efi fdtfile setenv efi old arch setenv efi old vci dhcp command is text dhcp boot image via network using dhcp tftp protocol usage dhcp loadaddress hostipaddr bootfilename assume dhcp tftp https www emcraft com som using dhcp is not used tftpboot command is text tftpboot boot image via network using tftp protocol usage tftpboot loadaddress hostipaddr bootfilename fdt command is text fdt flattened device tree utility commands usage fdt addr c addr length set the control fdt location to addr fdt apply addr apply overlay to the dt fdt move fdt newaddr length copy the fdt to addr and make it active fdt resize extrasize resize fdt to size padding to 4k addr some optional extrasize if needed fdt print path prop recursive print starting at path fdt list path prop print one level starting at path fdt get value var path prop get property and store in var fdt get name var path index get name of node index and store in var fdt get addr var path prop get start address of property and store in var fdt get size var path prop get size of property or num nodes and store in var fdt set path prop val set property to val fdt mknode path node create a new node after path fdt rm path prop delete the node or property fdt header get var member display header info get get header member member and store it in var fdt bootcpu id set boot cpuid fdt memory addr size add update memory node fdt rsvmem print show current mem reserves fdt rsvmem add addr size add a mem reserve fdt rsvmem delete index delete a mem reserves fdt chosen start end add update the chosen branch in the tree start end initrd start end addr note dereference aliases by omitting the leading e g fdt print ethernet0 booti command is text booti boot linux kernel image format from memory usage booti addr initrd size fdt boot linux flat or compressed image stored at addr the argument initrd is optional and specifies the address of an initrd in memory the optional parameter size allows specifying the size of a raw initrd currently only booting from gz bz2 lzma and lz4 compression types are supported in order to boot from any of these compressed images user have to set kernel comp addr r and kernel comp size environment variables beforehand since booting a linux kernel requires a flat device tree a third argument providing the address of the device tree blob is required to boot a kernel with a device tree blob but without an initrd image use a for the initrd argument bootefi command is text bootefi boots an efi payload from memory usage bootefi image address fdt address boot efi payload stored at address image address if specified the device tree located at fdt address gets exposed as efi configuration table bootefi bootmgr fdt address load and boot efi payload based on bootorder bootxxxx variables if specified the device tree located at fdt address gets exposed as efi configuration table doesn t work for nuttx text starfive bootefi kernel addr r fdt addr r card did not respond to voltage select 110 card did not respond to voltage select 110 no efi system partition no uefi binary known at 0x40200000 autoload https u boot readthedocs io en latest usage environment html setting is text autoload if set to no any string beginning with n bootp and dhcp will just load perform a lookup of the configuration from the bootp server but not try to load any image strange workaround for tftp timeout in u boot bootloader read the article strange workaround for tftp timeout in u boot bootloader star64 jh7110 risc v sbc https lupyuen github io articles tftp2 why does tftp time out so often on our sbc is it because our tftp server sends packets too quickly to our sbc frequent tftp timeouts t below are affecting our nuttx testing on star64 jh7110 sbc effective transfer rate is only 430 kbps text loading t t t 53 7 kib s source https gist github com lupyuen 9bdb1f5478318631d0480f03f6041d83 file jh7110 nuttx math log l140 l173 let s try something we send every tftp packet twice from https github com lupyuen rs tftpd timeout blob main src worker rs l232 l255 rust fn send window t socket socket t window window mut block num u16 result box dyn error for every frame for frame in window get elements send the tftp packet socket send packet data block num data frame to vec wait 1 millisecond static mut delay ms u64 1 let millis std time duration from millis delay ms std thread sleep millis send the same tftp packet again why does this work socket send packet data block num data frame to vec let s test this before fixing tftp transfer rate is 48 8 kib s with 6 timeouts see the log xinetd tftpd on raspberry pi 4 32 bit https gist github com lupyuen b36278130fbd281d03fc20189de5485e watch the demo on youtube https youtu be mpbc2qec6jo based on this configuration https community arm com oss platforms w docs 495 tftp remote network kernel using u boot after fixing tftp transfer rate is 1 1 mib s with no timeouts see the log rs tftpd timeout on raspberry pi 4 32 bit https gist github com lupyuen 19ab2e16c0c2bb46175bcd8fba7116f2 watch the demo on youtube https youtu be abpi2abln5o based on rs tftpd timeout https github com lupyuen rs tftpd timeout blob main src worker rs l232 l255 yep it works no more tftp timeouts tested on 32 bit raspberry pi 4 and on macos x64 todo why does it work dropped udp packets we should check with wireshark todo what if we throttle our tftp server to send packets slower nope doesn t help todo what if we we reduce the timeout nope doesn t work does this problem happen for devices other than star64 jh7110 nope this tftp timeout seems specific to star64 jh7110 we downloaded a 9 mb file from pi to macos over tftp on wired ethernet text before fixing tftp server 19 mbps curl output initrd tftp 192 168 31 10 initrd total received xferd average speed time time time current dload upload total spent left speed 100 9015k 0 9015k 0 0 2374k 0 0 00 03 2374k after fixing tftp server 3 3 mbps curl output initrd tftp 192 168 31 10 initrd total received xferd average speed time time time current dload upload total spent left speed 100 9015k 100 9015k 0 0 411k 0 0 00 21 0 00 21 411k the fixed tftp server is slower because of the 1 millisecond delay between packets and we sent every packet twice so maybe u boot bootloader on star64 jh7110 is too slow to catch all the tftp packets hang in enter critical section read the article star64 jh7110 nuttx rtos risc v privilege levels and uart registers https lupyuen github io articles privilege nuttx on star64 jh7110 hangs when entering critical section from uart 16550 c https github com lupyuen2 wip pinephone nuttx blob star64 drivers serial uart 16550 c l1713 l1737 c int up putc int ch far struct u16550 s priv far struct u16550 s console dev priv irqstate t flags all interrupts must be disabled to prevent re entrancy and to prevent interrupts from firing in the serial driver code this will hang flags enter critical section u16550 putc priv ch leave critical section flags return ch which assembles to text int up putc int ch up irq save nuttx include arch irq h 675 asm volatile 40204598 47a1 li a5 8 4020459a 3007b7f3 csrrc a5 mstatus a5 up putc nuttx drivers serial uart 16550 c 1726 flags enter critical section but mstatus is not accessible at supervisor level let s trace this enter critical section https github com lupyuen2 wip pinephone nuttx blob star64 include nuttx irq h l156 l191 calls up irq save https github com lupyuen2 wip pinephone nuttx blob star64 arch risc v include irq h l660 l689 c disable interrupts and return the previous value of the mstatus register static inline irqstate t up irq save void irqstate t flags read mstatus clear machine interrupt enable mie in mstatus asm volatile csrrc 0 xstr csr status 1 n r flags r status ie memory return the previous mstatus value so that it can be restored with up irq restore return flags csr status is defined in mode h https github com lupyuen2 wip pinephone nuttx blob star64 arch risc v include mode h l35 l103 c ifdef config arch use s mode define csr status sstatus global status register else define csr status mstatus global status register endif so we need to set config arch use s mode https github com lupyuen2 wip pinephone nuttx blob star64 arch risc v kconfig l278 l296 which is defined in kernel mode rv virt knsh64 https github com lupyuen2 wip pinephone nuttx blob star64 boards risc v qemu rv rv virt configs knsh64 defconfig so we change build config to bash tools configure sh rv virt knsh64 and we bypassed machine mode initialisation during startup from qemu rv start c https github com lupyuen2 wip pinephone nuttx blob star64a arch risc v src qemu rv qemu rv start c l166 l231 c void qemu rv start int mhartid clear bss debugassert mhartid 0 if 0 mhartid qemu rv clear bss bypass to s mode init qemu rv start s mhartid skip m mode init todo what about satp stvec pmpaddr0 pmpcfg0 grep for csr in nuttx s shows that no more m mode registers are used now critical section is ok yay text starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123067dfaghbcicd see the build steps https github com lupyuen2 wip pinephone nuttx releases tag star64 0 0 1 see the modified files https github com lupyuen2 wip pinephone nuttx pull 31 files see the build outputs https github com lupyuen2 wip pinephone nuttx releases tag star64 0 0 1 what about satp stvec pmpaddr0 pmpcfg0 we ll handle them in a while sometimes we see this text starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123067dfaghbcunhandled exception store amo access fault epc 0000000040200628 ra 00000000402004ba tval ffffff8000008000 epc ffffffff804ba628 ra ffffffff804ba4ba reloc adjusted sp 0000000040406a30 gp 00000000ff735e00 tp 0000000000000001 t0 0000000010000000 t1 0000000000000037 t2 ffffffffffffffff s0 0000000040400000 s1 0000000000000200 a0 0000000000000003 a1 0000080000008000 a2 0000000010100000 a3 0000000040400000 a4 0000000000000026 a5 0000000000000000 a6 00000000101000e7 a7 0000000000000000 s2 0000080000008000 s3 0000000040600000 s4 0000000040400000 s5 0000000000000000 s6 0000000000000026 s7 00fffffffffff000 s8 0000000040404000 s9 0000000000001000 s10 0000000040400ab0 s11 0000000000200000 t3 0000000000000023 t4 000000004600f43a t5 000000004600d000 t6 000000004600cfff code 879b 0277 d7b3 00f6 f793 1ff7 078e 95be b023 0105 which fails at text nuttx arch risc v src common riscv mmu c 101 lntable index paddr mmuflags 40200620 1ff7f793 andi a5 a5 511 40200624 078e slli a5 a5 0x3 40200626 95be add a1 a1 a5 40200628 0105b023 sd a6 0 a1 fails here mmu invalidate tlb by vaddr nuttx arch risc v src common riscv mmu h 237 asm volatile 4020062c 12d00073 sfence vma zero a3 40200630 8082 ret todo trace this store amo access fault hang in uart transmit read the article star64 jh7110 nuttx rtos risc v privilege levels and uart registers https lupyuen github io articles privilege when printing to uart port the uart transmit hangs while waiting for uart transmit ready from uart 16550 c https github com lupyuen2 wip pinephone nuttx blob star64 drivers serial uart 16550 c l1638 l1642 c static void u16550 putc far struct u16550 s priv int ch this will hang while u16550 serialin priv uart lsr offset uart lsr thre 0 u16550 serialout priv uart thr offset uart datawidth t ch where u16550 serialin https github com lupyuen2 wip pinephone nuttx blob star64a drivers serial uart 16550 c l596 l611 is defined as c far volatile uart datawidth t priv uartbase offset and uart thr offset https github com lupyuen2 wip pinephone nuttx blob star64a include nuttx serial uart 16550 h l197 is c define uart lsr offset config 16550 regincr uart lsr incr config 16550 regincr is 1 text grep 16550 config config 16550 regincr 1 config 16550 regwidth 8 config 16550 addrwidth 0 as defined according to the default config for 16550 kconfig 16550 https github com lupyuen2 wip pinephone nuttx blob star64a drivers serial kconfig 16550 l501 l520 text config 16550 regincr int address increment between 16550 registers default 1 help the address increment between 16550 registers options are 1 2 or 4 default 1 config 16550 regwidth int bit width of 16550 registers default 8 help the bit width of registers options are 8 16 or 32 default 8 config 16550 addrwidth int address width of 16550 registers default 8 help the bit width of registers options are 0 8 16 or 32 default 8 note 0 means auto detect address size uintptr t but is config 16550 regincr correct for star64 jh7110 let s check the official linux driver according to jh7110 linux device tree https doc en rvspace org visionfive2 dg uart jh7110 sdk general uart controller html text reg 0x0 0x10000000 0x0 0xl0000 reg io width 4 reg shift 2 reg shift is 2 and from the linux 8250 driver 8250 dw c https github com torvalds linux blob master drivers tty serial 8250 8250 dw c l159 l169 text static void dw8250 serial out struct uart port p int offset int value struct dw8250 data d to dw8250 data p private data writeb value p membase offset p regshift if offset uart lcr d uart 16550 compatible dw8250 check lcr p value we see that the uart offset is shifted by 2 regshift which means we multiply the uart offset by 4 thus config 16550 regincr should be 4 not 1 how to fix config 16550 regincr we fix the nuttx configuration device drivers serial driver support 16550 uart chip support address increment between 16550 registers and change it from 1 to 4 knsh64 defconfig https github com lupyuen2 wip pinephone nuttx blob star64a boards risc v qemu rv rv virt configs knsh64 defconfig l11 text config 16550 regincr 4 now uart transmit doesn t hang yay text starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123067dfm45dtpaqgaclbhm45dtpbqm45dtpcqi nuttx now hangs somewhere in nx start let s log the nuttx scheduler enable scheduler logging scheduler logging in nuttx seems to have changed recently to enable scheduler logging make menuconfig disable this setting device drivers system logging prepend timestamp to syslog message enable these settings build setup debug options scheduler debug features scheduler error warnings and info output also enable build setup debug options binary loader debug features binary loader error warnings and info output after enabling scheduler logging and binary loader logging we see text 123067dfagaclbhbcqemu rv kernel mappings map i o regions qemu rv kernel mappings map kernel text qemu rv kernel mappings map kernel data qemu rv kernel mappings connect the l1 and l2 page tables qemu rv kernel mappings map the page pool qemu rv mm init mmu enable satp 1077956608 inx start entry elf initialize registering elf uart register registering dev console uart register registering dev ttys0 work start lowpri starting low priority kernel worker thread s nx start application starting init task system bin init load absmodule loading system bin init elf loadbinary loading file system bin init elf init filename system bin init loadinfo 0x404069e8 what is system bin init we ll find out in a while compare with qemu kernel mode run log https gist github com lupyuen 6888376da6561bdc060c2459dffdef01 see the qemu kernel mode build log https gist github com lupyuen dce0cdbbf4a4bdf9c79e617b3fe1b679 initialise risc v supervisor mode read the article star64 jh7110 nuttx rtos risc v privilege levels and uart registers https lupyuen github io articles privilege earlier we bypassed the machine mode and supervisor mode initialisation during nuttx startup from qemu rv start c https github com lupyuen2 wip pinephone nuttx blob star64a arch risc v src qemu rv qemu rv start c l166 l231 c void qemu rv start int mhartid clear bss debugassert mhartid 0 if 0 mhartid qemu rv clear bss bypass to s mode init qemu rv start s mhartid skip m mode init todo what about satp stvec pmpaddr0 pmpcfg0 now we restore the supervisor mode initialisation commenting out the machine mode initialisation from qemu rv start c https github com lupyuen2 wip pinephone nuttx blob star64a arch risc v src qemu rv qemu rv start c l165 l233 c void qemu rv start int mhartid debugassert mhartid 0 note still in m mode if 0 mhartid qemu rv clear bss initialize the per cpu areas riscv percpu add hart mhartid disable mmu and enable pmp write csr satp 0x0 write csr pmpaddr0 0x3fffffffffffffull write csr pmpcfg0 0xf set exception and interrupt delegation for s mode write csr medeleg 0xffff write csr mideleg 0xffff allow to write satp from s mode clear csr mstatus mstatus tvm set mstatus to s mode and enable sum clear csr mstatus mstatus mpp mask set csr mstatus mstatus mpps sstatus sum set the trap vector for s mode write csr stvec uintptr t trap vec set the trap vector for m mode write csr mtvec uintptr t trap vec m if 0 mhartid only the primary cpu needs to initialize mtimer before entering to s mode todo up mtimer initialize set mepc to the entry write csr mepc uintptr t qemu rv start s set a0 to mhartid explicitly and enter to s mode asm volatile mv a0 0 n mret n r mhartid jump to s mode init ourselves qemu rv start s mhartid todo port up mtimer initialize https github com lupyuen2 wip pinephone nuttx blob star64a arch risc v src qemu rv qemu rv timerisr c l151 l210 to star64 now nuttx boots further text 123067dfhbcqemu rv kernel mappings map i o regions qemu rv kernel mappings map kernel text qemu rv kernel mappings map kernel data qemu rv kernel mappings connect the l1 and l2 page tables qemu rv kernel mappings map the page pool qemu rv mm init mmu enable satp 1077956608 inx start entry elf initialize registering elf uart register registering dev console uart register registering dev ttys0 work start lowpri starting low priority kernel worker thread s nx start application starting init task system bin init load absmodule loading system bin init elf loadbinary loading file system bin init elf init filename system bin init loadinfo 0x404069e8 riscv exception exception breakpoint mcause 0000000000000003 epc 0000000040200434 mtval 0000000000000000 riscv exception panic exception 0000000000000003 assert current version nuttx 12 0 3 2261b80 dirty jul 15 2023 20 38 57 risc v assert assertion failed panic at file common riscv exception c 85 task idle task 0x40200ce6 up dump register epc 0000000040200434 up dump register a0 0000000000000001 a1 0000000040406778 a2 0000000000000000 a3 0000000000000001 up dump register a4 0000000000000000 a5 00000000404067e0 a6 0000000000000074 a7 fffffffffffffff8 up dump register t0 0000000000000030 t1 0000000000000007 t2 0000000000000020 t3 0000000040406aa0 up dump register t4 0000000040406a98 t5 00000000000001ff t6 000000000000002d up dump register s0 0000000000000000 s1 0000000040406968 s2 0000000040408720 s3 0000000000000000 up dump register s4 0000000000000000 s5 0000000000000000 s6 0000000000000000 s7 0000000000000000 up dump register s8 00000000fff47194 s9 0000000000000000 s10 0000000000000000 s11 0000000000000000 up dump register sp 0000000040406760 fp 0000000000000000 tp 0000000000000001 ra 0000000040213e24 dump stack user stack dump stack base 0x40406030 dump stack size 00003024 dump stack sp 0x40406760 stack dump 0x40406760 00000000 00000000 40213e6a 00000000 fff47194 00000000 404067d0 00000000 stack dump 0x40406780 00000001 00000000 00000010 00000000 00000000 00000000 40213ffc 00000000 stack dump 0x404067a0 40408720 00000000 40406968 00000000 00000000 00000000 4020c7ec 00000000 stack dump 0x404067c0 00000800 00000000 40219f30 00000000 612f2e2e 2f737070 2f6e6962 74696e69 stack dump 0x404067e0 00000a00 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406800 fff47194 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406820 00000000 00000000 00000000 00000000 40219f28 00000000 404069e8 00000000 stack dump 0x40406840 40219f28 00000000 40212bde 00000000 40227776 00000000 40406870 00000000 stack dump 0x40406860 00000000 00000000 fffffffc ffffffff 40219f28 00000000 404069e8 00000000 stack dump 0x40406880 40400170 00000000 40204fea 00000000 0000006c 00000000 404069e8 00000000 stack dump 0x404068a0 40400170 00000000 402050ae 00000000 40406908 00000000 40208f66 00000000 stack dump 0x404068c0 40406908 00000000 4020c8c6 00000000 40219f28 00000000 404086d0 00000000 stack dump 0x404068e0 ffffffda ffffffff 40215be6 00000000 40406968 00000000 00000001 00000000 stack dump 0x40406900 40400b28 00000000 40219f30 00000000 404086d0 00000000 40407e30 00000000 stack dump 0x40406920 40407370 00000000 40219f30 00000000 00000000 00000000 40219f01 00000000 stack dump 0x40406940 404069e8 00000000 404069e8 00000000 40219f28 00000000 4020dfdc 00000000 stack dump 0x40406960 40219f28 00000000 40205ede 00000000 fff47194 00000000 404069b0 00000000 stack dump 0x40406980 00000000 00000000 40205efe 00000000 00000000 00000000 404069b0 00000000 stack dump 0x404069a0 40408830 00000000 4020d88c 00000000 40226bc0 00000000 40219f28 00000000 stack dump 0x404069c0 40408830 00000000 00000000 00000000 40219f28 00000000 4020d894 00000000 stack dump 0x404069e0 40406a18 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406a00 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406a20 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406a40 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406a60 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406a80 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406aa0 402277d0 00000000 40219f28 00000000 40408830 00000000 404001f8 00000000 stack dump 0x40406ac0 fffffffe ffffffff 4020eb36 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406ae0 40406b60 00000000 40406b68 00000000 40219f28 00000000 40408830 00000000 stack dump 0x40406b00 00000c00 00000000 4020d38a 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406b20 00000000 00000000 fffda848 00000000 fffffff3 ffffffff 40400b18 00000000 stack dump 0x40406b40 4040177c 00000000 00000064 00000000 00000c00 00000000 40200ff4 00000000 stack dump 0x40406b60 00000000 00000000 40016400 00000000 00000000 00000000 00000c00 00000000 stack dump 0x40406b80 4040177c 00000000 40401780 00000000 40400b28 00000000 40200ee6 00000000 stack dump 0x40406ba0 40600000 00000000 00400000 00000000 00000026 00000000 00000003 00000000 stack dump 0x40406bc0 fff47194 00000000 ffff1428 00000000 10000000 00000000 40200514 00000000 stack dump 0x40406be0 00000400 00000000 40200552 00000000 40000000 00000000 402000de 00000000 dump tasks pid group pri policy type npx state event sigmask stackbase stacksize used filled command dump tasks 0x404002b0 2048 1160 56 6 irq dump task 0 0 0 fifo kthread n running 0000000000000000 0x40406030 3024 1448 47 8 idle task dump task 1 1 100 rr kthread waiting unlock 0000000000000000 0x4040a060 1952 264 13 5 lpwork 0x404013e0 but nuttx crashes let s find out why qemu semihosting in nuttx read the article star64 jh7110 nuttx rtos risc v semihosting and initial ram disk https lupyuen github io articles semihost nuttx crashes while booting on star64 jh7110 sbc from the crash dump above mcause https five embeddev com riscv isa manual latest machine html sec mcause is 3 machine software interrupt exception program counter 0x4020 0434 is in risc v semihosting smh call text 0000000040200430 smh call smh call nuttx arch risc v src common riscv semihost s 37 global smh call type smh call function smh call slli zero zero 0x1f 40200430 01f01013 slli zero zero 0x1f nuttx arch risc v src common riscv semihost s 38 ebreak crashes here trigger semihosting breakpoint 40200434 00100073 ebreak nuttx arch risc v src common riscv semihost s 39 srai zero zero 0x7 40200438 40705013 srai zero zero 0x7 nuttx arch risc v src common riscv semihost s 40 ret 4020043c 00008067 ret 40200440 0000 unimp when we log smh call text host call nbr 0x1 parm 0x40406778 size 24 host call https github com lupyuen2 wip pinephone nuttx blob star64a arch risc v src common riscv hostfs c l35 l73 says that the semihosting call is for host open open a file so nuttx crashes on star64 because it s trying to read system bin init via semihosting see next section let s disable semihosting and replace by initial ram disk and romfs see https github com apache nuttx issues 9501 qemu reads the apps filesystem over semihosting https lupyuen github io images semihost qemu jpg here s the crash dump after we disabled semihosting text 123067dfhbcqemu rv kernel mappings map i o regions qemu rv kernel mappings map kernel text qemu rv kernel mappings map kernel data qemu rv kernel mappings connect the l1 and l2 page tables qemu rv kernel mappings map the page pool qemu rv mm init mmu enable satp 1077956608 inx start entry elf initialize registering elf uart register registering dev console uart register registering dev ttys0 work start lowpri starting low priority kernel worker thread s nx start application starting init task system bin init load absmodule loading system bin init elf loadbinary loading file system bin init elf init filename system bin init loadinfo 0x404069e8 host call nbr 0x1 parm 0x40406788 size 24 assert current version nuttx 12 0 3 6ed2880 dirty jul 15 2023 21 00 59 risc v assert assertion failed panic at file common riscv hostfs c 58 task idle task 0x40200cd0 up dump register epc 000000004020f590 up dump register a0 0000000040401630 a1 000000000000003a a2 0000000040219ee8 a3 0000000000000000 up dump register a4 000000000000000a a5 0000000000000000 a6 0000000000000009 a7 0000000000000068 up dump register t0 0000000000000030 t1 0000000000000009 t2 0000000000000020 t3 000000000000002a up dump register t4 000000000000002e t5 00000000000001ff t6 000000000000002d up dump register s0 0000000000000000 s1 0000000040400b28 s2 0000000040401768 s3 0000000040219ee8 up dump register s4 0000000040229b10 s5 000000000000003a s6 0000000000000000 s7 0000000000000000 up dump register s8 00000000fff47194 s9 0000000000000000 s10 0000000000000000 s11 0000000000000000 up dump register sp 0000000040406650 fp 0000000000000000 tp 0000000000000001 ra 000000004020f590 dump stack user stack dump stack base 0x40406030 dump stack size 00003024 dump stack sp 0x40406650 stack dump 0x40406640 40406650 00000000 4020f688 00000000 00000000 00000000 40212bc8 00000000 stack dump 0x40406660 deadbeef deadbeef 40406680 00000000 deadbeef deadbeef 7474754e 00000058 stack dump 0x40406680 404066b8 00000000 00000001 00000000 40406788 00000000 40205cc0 00000000 stack dump 0x404066a0 00000074 00000000 fffffff8 2e323100 00332e30 00000000 40229ae8 00000000 stack dump 0x404066c0 65366708 38383264 69642d30 20797472 206c754a 32203531 20333230 303a3132 stack dump 0x404066e0 39353a30 00000000 0000000a 00000000 00000000 73697200 00762d63 00000000 stack dump 0x40406700 ffff9fef ffffffff 40406740 00000000 fff47194 00000000 00000000 00000000 stack dump 0x40406720 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406740 40408720 00000000 40406968 00000000 00000000 00000000 40204e80 00000000 stack dump 0x40406760 00000074 00000000 40213e3c 00000000 fff47194 00000000 40213e64 00000000 stack dump 0x40406780 00000000 00000000 404067d0 00000000 00000001 00000000 00000010 00000000 stack dump 0x404067a0 40408720 00000000 40213f7e 00000000 00000000 00000000 4020c7d6 00000000 stack dump 0x404067c0 00000800 00000000 40219e70 00000000 612f2e2e 2f737070 2f6e6962 74696e69 stack dump 0x404067e0 00000a00 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406800 fff47194 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406820 00000000 00000000 00000000 00000000 40219e68 00000000 404069e8 00000000 stack dump 0x40406840 40219e68 00000000 40212bc8 00000000 402276b6 00000000 40406870 00000000 stack dump 0x40406860 00000000 00000000 fffffffc ffffffff 40219e68 00000000 404069e8 00000000 stack dump 0x40406880 40400170 00000000 40204fd4 00000000 0000006c 00000000 404069e8 00000000 stack dump 0x404068a0 40400170 00000000 40205098 00000000 40406908 00000000 40208f50 00000000 stack dump 0x404068c0 40406908 00000000 4020c8b0 00000000 40219e68 00000000 404086d0 00000000 stack dump 0x404068e0 ffffffda ffffffff 40215b2a 00000000 40406968 00000000 00000001 00000000 stack dump 0x40406900 40400b28 00000000 40219e70 00000000 404086d0 00000000 40407e30 00000000 stack dump 0x40406920 40407370 00000000 40219e70 00000000 00000000 00000000 40219e01 00000000 stack dump 0x40406940 404069e8 00000000 404069e8 00000000 40219e68 00000000 4020dfc6 00000000 stack dump 0x40406960 40219e68 00000000 40205ec8 00000000 fff47194 00000000 404069b0 00000000 stack dump 0x40406980 00000000 00000000 40205ee8 00000000 00000000 00000000 404069b0 00000000 stack dump 0x404069a0 40408830 00000000 4020d876 00000000 40226b00 00000000 40219e68 00000000 stack dump 0x404069c0 40408830 00000000 00000000 00000000 40219e68 00000000 4020d87e 00000000 stack dump 0x404069e0 40406a18 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406a00 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406a20 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406a40 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406a60 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406a80 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406aa0 40227710 00000000 40219e68 00000000 40408830 00000000 404001f8 00000000 stack dump 0x40406ac0 fffffffe ffffffff 4020eb20 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406ae0 40406b60 00000000 40406b68 00000000 40219e68 00000000 40408830 00000000 stack dump 0x40406b00 00000c00 00000000 4020d374 00000000 00000000 00000000 00000000 00000000 stack dump 0x40406b20 00000000 00000000 fffda848 00000000 fffffff3 ffffffff 40400b18 00000000 stack dump 0x40406b40 4040177c 00000000 00000064 00000000 00000c00 00000000 40200fde 00000000 stack dump 0x40406b60 00000000 00000000 40016400 00000000 00000000 00000000 00000c00 00000000 stack dump 0x40406b80 4040177c 00000000 40401780 00000000 40400b28 00000000 40200ed0 00000000 stack dump 0x40406ba0 40600000 00000000 00400000 00000000 00000026 00000000 00000003 00000000 stack dump 0x40406bc0 fff47194 00000000 ffff1428 00000000 10000000 00000000 402004fe 00000000 stack dump 0x40406be0 00000400 00000000 4020053c 00000000 00000000 00000000 402000de 00000000 dump tasks pid group pri policy type npx state event sigmask stackbase stacksize used filled command dump tasks 0x404002b0 2048 0 0 0 irq dump task 0 0 0 fifo kthread n running 0000000000000000 0x40406030 3024 2248 74 3 idle task dump task 1 1 100 rr kthread waiting unlock 0000000000000000 0x4040a060 1952 264 13 5 lpwork 0x404013e0 nuttx apps filesystem read the article star64 jh7110 nuttx rtos risc v semihosting and initial ram disk https lupyuen github io articles semihost where is system bin init why is it loaded by nuttx over semihosting system bin init is needed for starting the nuttx shell and nuttx apps on star64 jh7110 sbc we see it in the nuttx build configuration text grep init config config init file y config init args config init stacksize 3072 config init priority 100 config init filepath system bin init config init mount y config init mount source config init mount target system config init mount fstype hostfs config init mount flags 0x1 config init mount data fs apps config path initial system bin config nsh archinit y which says that apps is mounted as system via semihosting hostfs that s how system bin init gets loaded over semihosting ls apps bin getprime hello init sh qemu reads the apps filesystem over semihosting https lupyuen github io images semihost qemu jpg we traced the semihosting calls in qemu kernel mode here s what we observed qemu kernel mode run log https gist github com lupyuen 6888376da6561bdc060c2459dffdef01 text nx start application starting init task system bin init load absmodule loading system bin init elf loadbinary loading file system bin init elf init filename system bin init loadinfo 0x802069e8 hostfs open relpath bin init oflags 0x1 mode 0x1b6 nuttshell nsh nuttx 12 2 1 rc0 nsh nx start cpu0 beginning idle loop nsh nsh uname a posix spawn pid 0xc0202978 path uname file actions 0xc0202980 attr 0xc0202988 argv 0xc0202a28 hostfs stat relpath bin uname host call nbr 0x1 parm 0x80208fe0 size 24 exec spawn error failed to load program uname 2 nxposix spawn exec error exec failed 2 nuttx 12 2 1 rc0 cafbbb1 jul 15 2023 16 55 00 risc v rv virt nsh nsh ls posix spawn pid 0xc0202978 path ls file actions 0xc0202980 attr 0xc0202988 argv 0xc0202a28 hostfs stat relpath bin ls host call nbr 0x1 parm 0x80208fe0 size 24 exec spawn error failed to load program ls 2 nxposix spawn exec error exec failed 2 dev proc system nsh nsh ls system posix spawn pid 0xc0202978 path ls file actions 0xc0202980 attr 0xc0202988 argv 0xc0202a28 hostfs stat relpath bin ls host call nbr 0x1 parm 0x80208fe0 size 24 exec spawn error failed to load program ls 2 nxposix spawn exec error exec failed 2 hostfs stat relpath host call nbr 0x1 parm 0x80209180 size 24 host call nbr 0xc parm 0x80209180 size 8 host call nbr 0x2 parm 0x80209190 size 8 system nsh nsh ls system bin posix spawn pid 0xc0202978 path ls file actions 0xc0202980 attr 0xc0202988 argv 0xc0202a28 hostfs stat relpath bin ls host call nbr 0x1 parm 0x80208fe0 size 24 exec spawn error failed to load program ls 2 nxposix spawn exec error exec failed 2 hostfs stat relpath bin host call nbr 0x1 parm 0x80209180 size 24 host call nbr 0xc parm 0x80209180 size 8 host call nbr 0x2 parm 0x80209190 size 8 system bin nsh nsh ls system bin init posix spawn pid 0xc0202978 path ls file actions 0xc0202980 attr 0xc0202988 argv 0xc0202a28 hostfs stat relpath bin ls host call nbr 0x1 parm 0x80208fe0 size 24 exec spawn error failed to load program ls 2 nxposix spawn exec error exec failed 2 hostfs stat relpath bin init host call nbr 0x1 parm 0x80209180 size 24 host call nbr 0xc parm 0x80209180 size 8 host call nbr 0x2 parm 0x80209190 size 8 system bin init semihosting won t work on star64 sbc let s replace this with initial ram disk and romfs see https github com apache nuttx issues 9501 initial ram disk for litex arty a7 read the article star64 jh7110 nuttx rtos risc v semihosting and initial ram disk https lupyuen github io articles semihost let s modify nuttx for qemu to mount the apps filesystem from an initial ram disk instead of semihosting so later we can replicate this on star64 jh7110 sbc first we look at the initial ram disk for litex arty a7 about nuttx ram disks and rom disks https cwiki apache org confluence plugins servlet mobile contentid 139629548 content view 139629548 to generate the ram disk we run this command vexriscv smp core https nuttx apache org docs latest platforms risc v litex cores vexriscv smp index html bash cd nuttx genromfs f romfs img d apps bin v nuttxbootvol about genromfs https www systutorials com docs linux man 8 genromfs litex memory map says where the ram disk is loaded text romfs img 0x40c00000 nuttx bin 0x40000000 opensbi bin 0x40f00000 this is the litex build configuration for mounting the ram disk knsh defconfig https github com lupyuen2 wip pinephone nuttx blob star64 boards risc v litex arty a7 configs knsh defconfig l34 bash config boardctl romdisk y config board late initialize y config build kernel y config fs romfs y config init filepath system bin init config init mount y config init mount flags 0x1 config init mount target system bin config litex application ramdisk y config nsh file apps y config nsh readline y config path initial system bin config ram size 4194304 config ram start 0x40400000 config raw binary y config system nsh progname init config testing getprime y according to nsh start up script https nuttx apache org docs latest applications nsh nsh html nsh start up script text config disable mountpoint not set config fs romfs enabled the ram disk is mounted at litex startup litex appinit c https github com apache nuttx blob master boards risc v litex arty a7 src litex appinit c l76 l103 c void board late initialize void ifdef config litex application ramdisk litex mount ramdisk endif litex bringup litex bringup mounts the ram disk at startup litex ramdisk c https github com apache nuttx blob master boards risc v litex arty a7 src litex ramdisk c l41 l98 c ifndef config build kernel error ramdisk usage is intended to be used with kernel build only endif define sectorsize 512 define nsectors b b sectorsize 1 sectorsize define ramdisk device minor 0 mount a ramdisk defined in the ld kernel script to dev ramx the ramdisk is intended to contain a romfs with applications which can be spawned at runtime int litex mount ramdisk void int ret struct boardioc romdisk s desc desc minor ramdisk device minor desc nsectors nsectors ssize t ramdisk size desc sectsize sectorsize desc image ramdisk start ret boardctl boardioc romdisk uintptr t desc if ret 0 syslog log err ramdisk register failed s n strerror errno syslog log err ramdisk mountpoint dev ram d n ramdisk device minor syslog log err ramdisk length u origin x n ssize t ramdisk size uintptr t ramdisk start return ret ramdisk start is defined in board memorymap h https github com lupyuen2 wip pinephone nuttx blob star64b boards risc v litex arty a7 include board memorymap h l58 l91 c ramdisk define ramdisk start uintptr t ramdisk start define ramdisk size uintptr t ramdisk size ramdisk rw extern uint8 t ramdisk start extern uint8 t ramdisk size and ld kernel script https github com lupyuen2 wip pinephone nuttx blob star64b boards risc v litex arty a7 scripts ld kernel script l20 l49 text memory kflash rx origin 0x40000000 length 4096k w cache ksram rwx origin 0x40400000 length 4096k w cache pgram rwx origin 0x40800000 length 4096k w cache ramdisk rwx origin 0x40c00000 length 4096k w cache page heap pgheap start origin pgram pgheap size length pgram length ramdisk application ramdisk ramdisk start origin ramdisk ramdisk size length ramdisk ramdisk end origin ramdisk length ramdisk note that pgheap size needs to include ramdisk let s do the same to nuttx for qemu modify nuttx qemu to load initial ram disk read the article star64 jh7110 nuttx rtos risc v semihosting and initial ram disk https lupyuen github io articles semihost now we can modify nuttx for qemu to mount the apps filesystem from an initial ram disk instead of semihosting so later we can replicate this on star64 jh7110 sbc nuttx for qemu will mount the apps filesystem from an initial ram disk https lupyuen github io images semihost qemu2 jpg we follow the steps from litex arty a7 from the previous section we build nuttx qemu in kernel mode build steps https github com lupyuen2 wip pinephone nuttx tree master boards risc v qemu rv rv virt bash build nuttx qemu kernel mode tools configure sh rv virt knsh64 make v 1 j7 build apps filesystem make export v 1 pushd apps tools mkimport sh z x nuttx nuttx export tar gz make import v 1 popd we generate the initial ram disk initrd bash cd nuttx genromfs f initrd d apps bin v nuttxbootvol about genromfs https www systutorials com docs linux man 8 genromfs initial ram disk initrd is 7 9 mb text ls l initrd rw r r 1 7902208 jul 21 13 41 initrd this is how we load the initial ram disk on qemu virt generic virtual platform virt https www qemu org docs master system riscv virt html running linux kernel bash qemu system riscv64 semihosting m virt aclint on cpu rv64 smp 8 bios none kernel nuttx initrd initrd nographic what is the ram address of the initial ram disk in qemu initial ram disk is loaded by qemu at 0x8400 0000 ram disk address for risc v qemu https github com lupyuen nuttx star64 ram disk address for risc v qemu below are the files that we changed in nuttx for qemu to load the initial ram disk instead of semihosting modified files for qemu with initial ram disk https github com lupyuen2 wip pinephone nuttx pull 33 files we configured qemu to mount the ram disk as romfs instead of semihosting knsh64 defconfig https github com lupyuen2 wip pinephone nuttx blob ramdisk boards risc v qemu rv rv virt configs knsh64 defconfig bash config boardctl romdisk y config board late initialize y config fs romfs y config init filepath system bin init config init mount y config init mount flags 0x1 config init mount target system bin we removed these config fs hostfs y config riscv semihosting hostfs y we defined the ram disk memory in the linker script ld kernel64 script https github com lupyuen2 wip pinephone nuttx blob ramdisk boards risc v qemu rv rv virt scripts ld kernel64 script l20 l54 text memory added ram disk ramdisk rwx origin 0x80800000 length 16m w cache this won t work crashes with a memory mgmt fault ramdisk rwx origin 0x84000000 length 16m w cache added ram disk page heap pgheap start origin pgram pgheap size length pgram length ramdisk previously pgheap size length pgram added ram disk application ramdisk ramdisk start origin ramdisk ramdisk size length ramdisk ramdisk end origin ramdisk length ramdisk we increased ram disk memory from 4 mb to 16 mb because our ram disk is now bigger at startup we mount the ram disk qemu rv appinit c https github com lupyuen2 wip pinephone nuttx blob ramdisk boards risc v qemu rv rv virt src qemu rv appinit c l83c1 l179c2 c called at nuttx startup void board late initialize void mount the ram disk mount ramdisk perform board specific initialization ifdef config nsh archinit mount null proc procfs 0 null endif mount the ram disk int mount ramdisk void int ret struct boardioc romdisk s desc desc minor ramdisk device minor desc nsectors nsectors ssize t ramdisk size desc sectsize sectorsize desc image ramdisk start ret boardctl boardioc romdisk uintptr t desc if ret 0 syslog log err ramdisk register failed s n strerror errno syslog log err ramdisk mountpoint dev ram d n ramdisk device minor syslog log err ramdisk length lu origin lx n ssize t ramdisk size uintptr t ramdisk start return ret we copied the ram disk from the qemu address 0x84000000 to the nuttx address ramdisk start qemu rv mm init c https github com lupyuen2 wip pinephone nuttx blob ramdisk arch risc v src qemu rv qemu rv mm init c l271 l280 c void qemu rv kernel mappings void copy 0x84000000 to ramdisk start ramdisk size bytes todo ram disk must not exceed ramdisk size bytes memcpy void ramdisk start void 0x84000000 size t ramdisk size because somehow map region crashes when we try to map 0x84000000 https github com lupyuen2 wip pinephone nuttx blob ramdisk arch risc v src qemu rv qemu rv mm init c l280 l287 we check that the ram disk memory is sufficient fs romfsutil c https github com lupyuen2 wip pinephone nuttx blob ramdisk fs romfs fs romfsutil c l85 l105 c static uint32 t romfs devread32 struct romfs mountpt s rm int ndx stop if ram disk memory is too small debugassert rm rm buffer ndx ramdisk start size t ramdisk size before making the above changes here s the log for qemu kernel mode with semihosting text genromfs f initrd d apps bin v nuttxbootvol riscv64 unknown elf size nuttx text data bss dec hex filename 171581 673 21872 194126 2f64e nuttx riscv64 unknown elf objcopy o binary nuttx nuttx bin cp config nuttx config riscv64 unknown elf objdump t s demangle line numbers wide nuttx sleep 10 qemu system riscv64 semihosting m virt aclint on cpu rv64 smp 8 bios none kernel nuttx initrd initrd nographic abcnx start entry uart register registering dev console uart register registering dev ttys0 work start lowpri starting low priority kernel worker thread s nx start application starting init task system bin init hostfs stat relpath bin init hostfs open relpath bin init oflags 0x1 mode 0x1b6 elf symname symbol has no name elf symvalue shn undef failed to get symbol name 3 elf relocateadd section 2 reloc 2 undefined symbol 0 has no name 3 nuttshell nsh nuttx 12 0 3 nsh nx start cpu0 beginning idle loop now we run qemu kernel mode with initial ram disk without semihosting and it boots ok on qemu yay see the run log https gist github com lupyuen 8afee5b07b61bb7f9f202f7f8c5e3ab3 modify nuttx star64 to load initial ram disk read the article star64 jh7110 nuttx rtos risc v semihosting and initial ram disk https lupyuen github io articles semihost finally we can modify nuttx for star64 jh7110 risc v sbc to mount the apps filesystem from an initial ram disk instead of semihosting nuttx for star64 jh7110 risc v sbc will mount the apps filesystem from an initial ram disk https lupyuen github io images semihost star64 jpg we follow the steps from qemu kernel mode s initial ram disk see previous section we build nuttx star64 in kernel mode build steps https github com lupyuen2 wip pinephone nuttx tree master boards risc v qemu rv rv virt bash build nuttx star64 in kernel mode tools configure sh rv virt knsh64 make v 1 j7 build apps filesystem make export v 1 pushd apps tools mkimport sh z x nuttx nuttx export tar gz make import v 1 popd we generate the initial ram disk initrd and copy to tftp folder for network booting bash generate initial ram disk cd nuttx genromfs f initrd d apps bin v nuttxbootvol copy nuttx binary image device tree and initial ram disk to tftp folder cp nuttx bin home tftproot image cp jh7110 star64 pine64 dtb home tftproot cp initrd home tftproot about genromfs https www systutorials com docs linux man 8 genromfs initial ram disk initrd is 7 9 mb text ls l initrd rw r r 1 7930880 jul 21 13 41 initrd below are the files that we changed in nuttx for star64 to load the initial ram disk instead of semihosting modified files for initial ram disk on star64 https github com lupyuen2 wip pinephone nuttx pull 34 files these are the same changes that we made earlier for qemu kernel mode s initial ram disk for a detailed explanation of the modified files see the previous section note that we copy the initial ram disk from 0x4610 0000 instead of qemu s 0x8400 0000 qemu rv mm init c https github com lupyuen2 wip pinephone nuttx blob star64c arch risc v src qemu rv qemu rv mm init c l271 l280 c copy 0x46100000 to ramdisk start ramdisk size bytes todo ram disk must not exceed ramdisk size bytes memcpy void ramdisk start void 0x46100000 size t ramdisk size why 0x4610 0000 see ramdisk addr r below this is how we updated the nuttx build configuration in make menuconfig board selection enable boardctl interface enable application space creation of rom disks rtos features rtos hooks custom board late initialization file systems romfs file system rtos features tasks and scheduling auto mount init file system set to system bin build setup debug options file system debug features file system error warnings and info output disable file systems host file system manually delete from knsh64 defconfig https github com lupyuen2 wip pinephone nuttx blob star64c boards risc v qemu rv rv virt configs knsh64 defconfig text config host macos y config init mount data fs apps config init mount fstype hostfs config init mount source updated build configuration knsh64 defconfig https github com lupyuen2 wip pinephone nuttx blob star64c boards risc v qemu rv rv virt configs knsh64 defconfig what is the ram address of the initial ram disk in star64 initial ram disk is loaded by star64 s u boot bootloader at 0x4610 0000 bash ramdisk addr r 0x46100000 source https lupyuen github io articles linux u boot settings for star64 which means that we need to add these tftp commands to u boot bootloader bash assume initial ram disk is max 16 mb setenv ramdisk size 0x1000000 check that it s correct printenv ramdisk size save it for future reboots saveenv load kernel and device tree over tftp tftpboot kernel addr r tftp server image tftpboot fdt addr r tftp server jh7110 star64 pine64 dtb fdt addr fdt addr r added this load initial ram disk over tftp tftpboot ramdisk addr r tftp server initrd changed this replaced by ramdisk addr r ramdisk size booti kernel addr r ramdisk addr r ramdisk size fdt addr r which will change our u boot boot script to bash load the nuttx image from tftp server kernel addr r 0x40200000 tftp server 192 168 x x if tftpboot kernel addr r tftp server image then load the device tree from tftp server fdt addr r 0x46000000 if tftpboot fdt addr r tftp server jh7110 star64 pine64 dtb then set the ram address of device tree fdt addr r 0x46000000 if fdt addr fdt addr r then load the intial ram disk from tftp server ramdisk addr r 0x46100000 if tftpboot ramdisk addr r tftp server initrd then boot the nuttx image with the initial ram disk and device tree kernel addr r 0x40200000 ramdisk addr r 0x46100000 ramdisk size 0x1000000 fdt addr r 0x46000000 booti kernel addr r ramdisk addr r ramdisk size fdt addr r fi fi fi fi which becomes bash assume initial ram disk is max 16 mb setenv ramdisk size 0x1000000 check that it s correct printenv ramdisk size save it for future reboots saveenv add the boot command for tftp setenv bootcmd tftp if tftpboot kernel addr r tftp server image then if tftpboot fdt addr r tftp server jh7110 star64 pine64 dtb then if fdt addr fdt addr r then if tftpboot ramdisk addr r tftp server initrd then booti kernel addr r ramdisk addr r ramdisk size fdt addr r fi fi fi fi check that it s correct printenv bootcmd tftp save it for future reboots saveenv what happens if we omit the ram disk size text booti kernel addr r ramdisk addr r fdt addr r wrong ramdisk image format ramdisk image is corrupt or invalid assume max 16 mb booti kernel addr r ramdisk addr r 0x1000000 fdt addr r boots ok does the initial ram disk work on star64 star64 jh7110 boots ok with the initial ram disk yay text starfive booti kernel addr r ramdisk addr r 0x1000000 fdt addr r flattened device tree blob at 46000000 booting using the fdt blob at 0x46000000 using device tree in place at 0000000046000000 end 000000004600f43a starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123067dfhbcinx start entry uart register registering dev console uart register registering dev ttys0 work start lowpri starting low priority kernel worker thread s board late initialize nx start application starting init task system bin init elf symname symbol has no name elf symvalue shn undef failed to get symbol name 3 elf relocateadd section 2 reloc 2 undefined symbol 0 has no name 3 nx start application ret 3 up exit tcb 0x404088d0 exiting nx start cpu0 beginning idle loop todo why no shell todo why nx start application ret 3 increase ram disk limit note that the initial ram disk initrd is limited to 16 mb because of the linker script ld script https github com apache nuttx blob master boards risc v jh7110 star64 scripts ld script text memory kflash rx origin 0x40200000 length 2048k w cache ksram rwx origin 0x40400000 length 2048k w cache pgram rwx origin 0x40600000 length 4096k w cache ramdisk rwx origin 0x40a00000 length 16m w cache if initrd exceeds 16 mb how to increase the ram disk limit edit the linker script above and change the ram disk length accordingly if we re booting nuttx over tftp remember to update the u boot script bash assume initial ram disk is max 16 mb setenv ramdisk size 0x1000000 check that it s correct printenv ramdisk size save it for future reboots saveenv source https lupyuen github io articles tftp configure u boot for tftp ramdisk size needs to be increased also todo can we fix the u boot script so that it doesn t hardcode the ram disk size memory map for ram disk note that the ram disk is mapped into the page heap pgheap size in the linker script from ld script https github com apache nuttx blob master boards risc v jh7110 star64 scripts ld script text memory kflash rx origin 0x40200000 length 2048k w cache ksram rwx origin 0x40400000 length 2048k w cache pgram rwx origin 0x40600000 length 4096k w cache ramdisk rwx origin 0x40a00000 length 16m w cache note page heap includes ram disk pgheap start origin pgram pgheap size length pgram length ramdisk application ramdisk ramdisk start origin ramdisk ramdisk size length ramdisk ramdisk end origin ramdisk length ramdisk won t the ram disk get incorrectly allocated to nuttx apps nope that won t happen because the actual page heap size without ram disk is defined by config arch pgpool size in the nuttx config from nsh defconfig https github com apache nuttx blob master boards risc v jh7110 star64 configs nsh defconfig l33 l34 bash config arch pgpool size 4194304 config arch pgpool vbase 0x40600000 this says that the actual page heap size is 4 mb excluding the ram disk let s increase the page heap size todo folks might forget to update config arch pgpool size let s verify that c debugassert pgheap size config arch pgpool size ramdisk size increase page heap size nuttx apps will allocate dynamic memory malloc from the nuttx page heap why does nuttx report that the page heap size is 20 mb text nuttshell nsh nuttx 12 0 3 nsh free total used free largest nused nfree kmem 2065400 14600 2050800 2049440 50 3 page 20971520 643072 20328448 20328448 source https gist github com lupyuen fe062fe61a646c465329b80b1fe5fcac file nuttx heap log l161 l165 that s because the 20 mb pgheap size includes the 4 mb page heap 16 mb ram disk as defined in the linker script from ld script https github com apache nuttx blob master boards risc v jh7110 star64 scripts ld script text memory kflash rx origin 0x40200000 length 2048k w cache ksram rwx origin 0x40400000 length 2048k w cache pgram rwx origin 0x40600000 length 4096k w cache ramdisk rwx origin 0x40a00000 length 16m w cache note page heap includes ram disk pgheap start origin pgram pgheap size length pgram length ramdisk by default the page heap size is actually 4 mb as defined by config arch pgpool size in the nuttx config from nsh defconfig https github com apache nuttx blob master boards risc v jh7110 star64 configs nsh defconfig l33 l34 bash config arch pgpool size 4194304 config arch pgpool vbase 0x40600000 how to increase the page heap size so that nuttx apps will have more dynamic memory malloc this is how we increase the page heap size from 4 mb to 16 mb from ld script https github com lupyuen2 wip pinephone nuttx blob malloc boards risc v jh7110 star64 scripts ld script l25 l26 text previously length 4096k pgram rwx origin 0x40600000 length 16m w cache previously origin 0x40a00000 ramdisk rwx origin 0x41600000 length 16m w cache note that the ram disk origin shifts down to make room for the increased page heap size 0x41600000 0x40600000 16 mb then we update config arch pgpool size in the nuttx config from nsh defconfig https github com lupyuen2 wip pinephone nuttx blob malloc boards risc v jh7110 star64 configs nsh defconfig l33 l34 bash previously 4194304 4 mb config arch pgpool size 16777216 config arch pgpool vbase 0x40600000 we reconfigure nuttx and rebuild bash make distclean tools configure sh star64 nsh make remember to rebuild the initial ram disk initrd now nuttx reports that the free memory is 32 mb 16 mb page heap 16 mb ram disk text nuttshell nsh nuttx 12 0 3 nsh free total used free largest nused nfree kmem 2065400 15000 2050400 2049040 50 4 page 33554432 643072 32911360 32911360 source https gist github com lupyuen 83980edd8d970d5530070fd78f6b0242 file nuttx heap increase ok log l162 l166 let s test to see if it works test the page heap in the previous section we increased the nuttx page heap size from 4 mb to 16 mb so that nuttx apps will have more dynamic memory malloc how do we test this we run a loop in our hello app to allocate 8 kb blocks repeatedly from hello main c https github com lupyuen2 wip pinephone nuttx apps blob malloc examples hello hello main c l41 l47 c for i 0 i void p malloc 8192 if p null break if i 10 0 printf i d n i printf malloc failed at i d n i we run the heap test code before and after increasing the page heap size before page heap size was 4 mb the hello app crashes after allocating 160 plus blocks of 8 kb text nsh hello i 160 i riscv exception exception store amo access fault mcause 0000000000000007 epc 0000000040206652 mtval 0000000000000000 riscv exception panic exception 0000000000000007 source https gist github com lupyuen fe062fe61a646c465329b80b1fe5fcac file nuttx heap log l184 l188 which is around 1 2 mb after page heap size is now 16 mb the hello app crashes after allocating 1 603 plus blocks of 8 kb text nsh hello i 1630 iriscv exception exception store amo access fault mcause 0000000000000007 epc 0000000040206652 mtval 0000000000000000 source https gist github com lupyuen 83980edd8d970d5530070fd78f6b0242 file nuttx heap increase ok log l332 l333 which is around 13 mb so yep the increase in page heap size works why does it crash based on the crash dump https gist github com lupyuen 83980edd8d970d5530070fd78f6b0242 file nuttx heap increase ok log l332 l333 text riscv exception exception store amo access fault mcause 7 epc 40206652 mtval 0 the exception program counter epc says 0x40206652 which is inside the code for memset we looked up the nuttx disassemly mtval is 0 which means that memset crashed while accessing a null pointer maybe printf tried to allocate a dynamic buffer and failed todo nuttx qemu doesn t crash when we run the same heap test the app exits gracefully to the nuttx shell might need more investigation see this https github com lupyuen2 wip pinephone nuttx apps blob malloc2 examples hello hello main c l53 l73 increase stack size the default stack sizes for nuttx kernel and nuttx apps are rather small this might crash our nuttx apps when they run out of stack space text stacksize used filled command 2048 2040 99 6 irq 3056 1808 59 1 idle task 1968 752 38 2 lpwork 0x802015f0 0x80201618 3008 744 24 7 system bin init 2000 2000 100 0 scheme let s increase the interrupt and app stack sizes but we already set config yourappname stacksize 8192 https github com kendickey nuttx umb scheme blob main kconfig apparently it doesn t work maybe because we re running in nuttx kernel mode instead of nuttx flat mode this is how we increase the app stack size to 8192 in config bash config posix spawn default stacksize 8192 after increasing the app stack size our app no longer crashes before setting config posix spawn default stacksize https gist github com lupyuen 5c225a3a30086cd35455463955f5ff64 after setting config posix spawn default stacksize https gist github com lupyuen 572e6018ed982fe42b2b5ed40ffae505 scheme runs ok on star64 yay https gist github com lupyuen 1e009a3343da70257d6f24400339053f this is how we increase the default stack size interrupt stack size and other kernel stack sizes from nsh defconfig https github com lupyuen2 wip pinephone nuttx commit 5441201b82755f979958e8b33a955554bbe345b6 bash config arch interruptstack 8192 config arch kernel stacksize 8192 config default task stacksize 8192 config idlethread stacksize 8192 use default values config init stacksize 8192 config posix spawn default stacksize 8192 the log shows that the interrupt and kernel stacks have been increased text stacksize used filled command 8192 8184 99 9 irq 8176 1824 22 3 idle task 8112 720 8 8 lpwork 0x80202df0 0x80202e18 8128 848 10 4 system bin init todo why is interrupt stack full again how do we search menuconfig for a setting like default task stacksize normally we don t edit config directly we do it in menuconfig like this 1 run make menuconfig 1 press to search 1 enter default task stacksize or a substring we should see the location of the setting like rtos features stack and heap information 1 to update the nuttx build config bash make savedefconfig grep v config host defconfig boards risc v jh7110 star64 configs nsh defconfig no uart output from nuttx shell read the article star64 jh7110 nuttx rtos risc v plic interrupts and serial i o https lupyuen github io articles plic from the previous section we found out that nuttx shell didn t appear on star64 jh7110 sbc when we log uart write https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial serial c l1172 l1341 we see that the nuttx shell is actually started text uart write 0xc000a610 0000 0a 4e 75 74 74 53 68 65 6c 6c 20 28 4e 53 48 29 nuttshell nsh 0010 20 4e 75 74 74 58 2d 31 32 2e 30 2e 33 0a nuttx 12 0 3 uart write 0xc0015338 0000 6e 73 68 3e 20 nsh uart write 0xc0015310 0000 1b 5b 4b k just that the nuttx shell couldn t produce any uart output this happens to all nuttx apps but not to nuttx kernel let s find out why by tracing the uart output in nuttx qemu uart output in nuttx qemu read the article star64 jh7110 nuttx rtos risc v plic interrupts and serial i o https lupyuen github io articles plic to understand how uart output printf works in nuttx apps and nuttx shell we add logs to nuttx qemu text abcnx start entry up irq enable up enable irq irq 17 up enable irq riscv irq soft 17 uart register registering dev console uart register registering dev ttys0 up enable irq irq 35 up enable irq extirq 10 riscv irq ext 25 work start lowpri starting low priority kernel worker thread s board late initialize nx start application starting init task system bin init elf symname symbol has no name elf symvalue shn undef failed to get symbol name 3 elf relocateadd section 2 reloc 2 undefined symbol 0 has no name 3 up exit tcb 0x802088d0 exiting riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 uart write 0xc0200428 0000 2a 2a 2a 6d 61 69 6e 0a main faaaaaaaadef f f fmfafifnf riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 uart write 0xc000a610 0000 0a 4e 75 74 74 53 68 65 6c 6c 20 28 4e 53 48 29 nuttshell nsh 0010 20 4e 75 74 74 58 2d 31 32 2e 30 2e 33 0a nuttx 12 0 3 faaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadef fnfuftftfsfhfeflflf f fnfsfhf f fnfuftftfxf f1f2f f0f f3f riscv doirq irq 8 uart write 0xc0015340 0000 6e 73 68 3e 20 nsh aaaaadefnfsfhf f riscv doirq irq 8 uart write 0xc0015318 0000 1b 5b 4b k aaadef fk riscv doirq irq 8 nx start cpu0 beginning idle loop riscv doirq irq 35 adefa riscv doirq irq 8 riscv doirq irq 35 adefa riscv doirq irq 8 riscv doirq irq 35 adefa riscv doirq irq 8 this says that nuttx apps call uart write https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial serial c l1172 l1341 which calls a uart putxmitchar https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial serial c l150 l286 which calls d uart xmitchars https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial serial io c l42 l107 which calls e uart txready https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial serial io c l63 l68 and f u16550 send https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial uart 16550 c l1542 l1556 when we type something the uart input will trigger an interrupt also for nuttx apps calling a system function in nuttx kernel exception common https github com lupyuen2 wip pinephone nuttx blob ramdisk2 arch risc v src common riscv exception common s l63 l189 calls riscv dispatch irq https github com lupyuen2 wip pinephone nuttx blob ramdisk2 arch risc v src qemu rv qemu rv irq dispatch c l51 l92 which calls riscv doirq https github com lupyuen2 wip pinephone nuttx blob ramdisk2 arch risc v src common riscv doirq c l58 l131 which calls u16550 interrupt https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial uart 16550 c l918 l1021 what is riscv doirq irq 35 this is the interrupt triggered by uart input qemu uart is at risc v irq 10 https github com lupyuen nuttx star64 blob main qemu riscv64 dts l225 l226 which becomes nuttx irq 35 10 25 riscv irq ext riscv irq sext 16 9 25 https github com lupyuen2 wip pinephone nuttx blob ramdisk2 arch risc v include irq h l75 l86 why so many riscv doirq irq 8 nuttx irq 8 is riscv irq ecallu https github com lupyuen2 wip pinephone nuttx blob ramdisk2 arch risc v include irq h l52 l74 ecall from risc v user mode to supervisor mode this happens when the nuttx app user mode calls a system function in nuttx kernel supervisor mode uart output in nuttx qemu https lupyuen github io images plic qemu png now we compare the above with star64 compare uart output star64 vs qemu read the article star64 jh7110 nuttx rtos risc v plic interrupts and serial i o https lupyuen github io articles plic in the previous section we added logs to uart i o in nuttx qemu we add the same logs to nuttx star64 and compare text 123067bcnx start entry up irq enable up enable irq irq 17 up enable irq riscv irq soft 17 uart register registering dev console uart register registering dev ttys0 up enable irq irq 57 up enable irq extirq 32 riscv irq ext 25 work start lowpri starting low priority kernel worker thread s board late initialize nx start application starting init task system bin init elf symname symbol has no name elf symvalue shn undef failed to get symbol name 3 elf relocateadd section 2 reloc 2 undefined symbol 0 has no name 3 nx start application ret 3 up exit tcb 0x404088d0 exiting riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 uart write 0xc0200428 0000 2a 2a 2a 6d 61 69 6e 0a main aaaaaaaaad riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 riscv doirq irq 8 uart write 0xc000a610 0000 0a 4e 75 74 74 53 68 65 6c 6c 20 28 4e 53 48 29 nuttshell nsh 0010 20 4e 75 74 74 58 2d 31 32 2e 30 2e 33 0a nuttx 12 0 3 aaaaaaaaaaaaaaariscv doirq irq 8 uart write 0xc0015338 0000 6e 73 68 3e 20 nsh aaaaad riscv doirq irq 8 uart write 0xc0015310 0000 1b 5b 4b k aaad riscv doirq irq 8 nx start cpu0 beginning idle loop from the previous section we know that uart write https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial serial c l1172 l1341 should call a uart putxmitchar https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial serial c l150 l286 which calls d uart xmitchars https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial serial io c l42 l107 which calls e uart txready https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial serial io c l63 l68 and f u16550 send https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial uart 16550 c l1542 l1556 but from the above star64 log we see that uart txready https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial serial io c l63 l68 is not ready that s why nuttx star64 doesn t call u16550 send https github com lupyuen2 wip pinephone nuttx blob ramdisk2 drivers serial uart 16550 c l1542 l1556 to print the output is our interrupt controller https github com lupyuen2 wip pinephone nuttx blob star64c arch risc v src qemu rv hardware qemu rv memorymap h l27 l33 ok nuttx star64 doesn t respond to uart input we ll check why in a while see the jh7110 u74 memory map https doc en rvspace org jh7110 trm jh7110 trm u74 memory map html is the uart irq number correct star64 uart is risc v irq 32 https doc en rvspace org visionfive2 dg uart jh7110 sdk general uart controller html which becomes nuttx irq 57 32 25 riscv irq ext riscv irq sext 16 9 25 https github com lupyuen2 wip pinephone nuttx blob ramdisk2 arch risc v include irq h l75 l86 bash config 16550 uart0 irq 57 source https github com lupyuen2 wip pinephone nuttx blob star64d boards risc v qemu rv rv virt configs knsh64 defconfig l10 l17 also from jh7110 interrupt connections https doc en rvspace org jh7110 trm jh7110 trm interrupt connections html u0 uart is at global interrupts 27 which is correct because sifive u74 mc core complex manual https starfivetech com uploads u74mc core complex manual 21g1 pdf page 198 says that global interrupts 0 is plic interrupt id 5 thus u0 uart irq 32 is at global interrupts 27 is it the same uart irq as linux we check the linux device tree text dtc o jh7110 visionfive v2 dts o dts i dtb jh7110 visionfive v2 dtb which produces jh7110 visionfive v2 dts https github com lupyuen nuttx star64 blob main jh7110 visionfive v2 dts uart0 is indeed risc v irq 32 jh7110 visionfive v2 dts https github com lupyuen nuttx star64 blob main jh7110 visionfive v2 dts l619 l631 text serial 10000000 compatible snps dw apb uart reg 0x00 0x10000000 0x00 0x10000 reg io width 0x04 reg shift 0x02 clocks 0x08 0x92 0x08 0x91 clock names baudclk 0apb pclk resets 0x21 0x53 0x21 0x54 interrupts 0x20 status okay pinctrl names default pinctrl 0 0x24 maybe the irq numbers are different for nuttx vs linux we tried to enable a whole bunch of irqs but nothing got triggered text up enable irq irq 26 up enable irq extirq 1 riscv irq ext 25 up enable irq irq 27 up enable irq extirq 2 riscv irq ext 25 up enable irq irq 28 up enable irq extirq 3 riscv irq ext 25 up enable irq irq 29 up enable irq irq 86 up enable irq extirq 61 riscv irq ext 25 up enable irq irq 87 up enable irq extirq 62 riscv irq ext 25 up enable irq irq 88 up enable irq extirq 63 riscv irq ext 25 so there s definitely a problem with our interrupt controller maybe irq 32 is too high qemu irq is only 10 jh7110 interrupt connections https doc en rvspace org jh7110 trm jh7110 trm interrupt connections html says that global interrupts are numbered 0 to 126 127 total interrupts that s a lot more than nuttx qemu can handle let s fix nuttx star64 to support more irqs from qemu rv irq h https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v include qemu rv irq h l31 l40 c map risc v exception code to nuttx irq jh7110 interrupt connections says that global interrupts are 0 to 126 127 total interrupts https doc en rvspace org jh7110 trm jh7110 trm interrupt connections html define nr irqs riscv irq sext 127 previously define qemu rv irq uart0 riscv irq mext 10 define nr irqs qemu rv irq uart0 1 from qemu rv irq c https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v src qemu rv qemu rv irq c l46 l72 c void up irqinitialize void set priority for all global interrupts to 1 lowest int id todo why 52 plic interrupts for id 1 id nr irqs id changed 52 to nr irqs putreg32 1 uintptr t qemu rv plic priority 4 id this is hardcoded to 64 irqs we should fix in future qemu rv irq c https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v src qemu rv qemu rv irq c l143 l198 c void up enable irq int irq else if irq riscv irq ext extirq irq riscv irq ext info extirq d riscv irq ext d n extirq riscv irq ext set enable bit for the irq if 0 extirq extirq 63 todo why 63 modifyreg32 qemu rv plic enable1 4 extirq 32 0 1 extirq 32 now we study the nuttx code for platform level interrupt controller platform level interrupt controller for star64 read the article star64 jh7110 nuttx rtos risc v plic interrupts and serial i o https lupyuen github io articles plic the platform level interrupt controller plic handles global interrupts triggered by peripherals like uart plic works like arm s global interrupt controller we update the nuttx plic code https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v src qemu rv qemu rv irq c l45 l214 based on these docs sifive u74 mc core complex manual https starfivetech com uploads u74mc core complex manual 21g1 pdf plic spec https github com riscv riscv plic spec blob master riscv plic adoc plic in jh7110 u74 soc https lupyuen github io images plic title jpg how to configure plic to forward interrupts to the harts the plic memory map is below from sifive u74 mc core complex manual https starfivetech com uploads u74mc core complex manual 21g1 pdf page 193 plic memory map address width attr description 0x0c00 0004 4b rw source 1 priority 0x0c00 0220 4b rw source 136 priority 0x0c00 1000 4b ro start of pending array 0x0c00 1010 4b ro last word of pending array 0x0c00 2100 4b rw start hart 1 s mode interrupt enables 0x0c00 2110 4b rw end hart 1 s mode interrupt enables 0x0c00 2200 4b rw start hart 2 s mode interrupt enables 0x0c00 2210 4b rw end hart 2 s mode interrupt enables 0x0c00 2300 4b rw start hart 3 s mode interrupt enables 0x0c00 2310 4b rw end hart 3 s mode interrupt enables 0x0c00 2400 4b rw start hart 4 s mode interrupt enables 0x0c00 2410 4b rw end hart 4 s mode interrupt enables 0x0c20 2000 4b rw hart 1 s mode priority threshold 0x0c20 2004 4b rw hart 1 s mode claim complete 0x0c20 4000 4b rw hart 2 s mode priority threshold 0x0c20 4004 4b rw hart 2 s mode claim complete 0x0c20 6000 4b rw hart 3 s mode priority threshold 0x0c20 6004 4b rw hart 3 s mode claim complete 0x0c20 8000 4b rw hart 4 s mode priority threshold 0x0c20 8004 4b rw hart 4 s mode claim complete there are 5 harts in jh7110 hart 0 s7 core the limited core unused harts 1 to 4 u7 cores the full cores according to opensbi we are now running on hart 1 sounds right we pass the hart id to nuttx as hart 0 since nuttx expects hart id to start at 0 based on the above plic memory map we fix the plic addresses in nuttx to use hart 1 qemu rv plic h https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v src qemu rv hardware qemu rv plic h l33 l59 c 0x0c00 0004 4b rw source 1 priority define qemu rv plic priority qemu rv plic base 0x000000 0x0c00 1000 4b ro start of pending array define qemu rv plic pending1 qemu rv plic base 0x001000 previously define qemu rv plic priority qemu rv plic base 0x000000 define qemu rv plic pending1 qemu rv plic base 0x001000 ifdef config arch use s mode 0x0c00 2100 4b rw start hart 1 s mode interrupt enables define qemu rv plic enable1 qemu rv plic base 0x002100 define qemu rv plic enable2 qemu rv plic base 0x002104 0x0c20 2000 4b rw hart 1 s mode priority threshold define qemu rv plic threshold qemu rv plic base 0x202000 0x0c20 2004 4b rw hart 1 s mode claim complete define qemu rv plic claim qemu rv plic base 0x202004 previously define qemu rv plic enable1 qemu rv plic base 0x002080 define qemu rv plic enable2 qemu rv plic base 0x002084 define qemu rv plic threshold qemu rv plic base 0x201000 define qemu rv plic claim qemu rv plic base 0x201004 what about the plic base address according to u74 memory map https doc en rvspace org jh7110 trm jh7110 trm u74 memory map html the base addresses are text 0x00 0200 0000 0x00 0200 ffff rw a clint 0x00 0c00 0000 0x00 0fff ffff rw a plic which are correct in nuttx qemu rv memorymap h https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v src qemu rv hardware qemu rv memorymap h l30 l32 c define qemu rv clint base 0x02000000 define qemu rv plic base 0x0c000000 note that there s a core local interruptor clint that handles software interrupt and timer interrupt plic and clint in jh7110 u74 soc https lupyuen github io images plic clint jpg todo do we need to handle clint let s check that the risc v interrupts are delegated correctly delegate machine mode interrupts to supervisor mode read the article star64 jh7110 nuttx rtos risc v plic interrupts and serial i o https lupyuen github io articles plic nuttx runs in risc v supervisor mode which can t handle interrupts directly needs machine mode how can we be sure that the risc v interrupts are correctly handled in supervisor mode from sifive interrupt cookbook https sifive cdn prismic io sifive 0d163928 2128 42be a75a 464df65e04e0 sifive interrupt cookbook pdf page 15 a cpu operating in supervisor mode will trap to machine mode upon the arrival of a machine mode interrupt unless the machine mode interrupt has been delegated to supervisor mode through the mideleg register on the contrary supervisor interrupts will not immediately trigger if a cpu is in machine mode while operating in supervisor mode a cpu does not have visibility to configure machine mode interrupts according to the risc v spec https five embeddev com riscv isa manual latest machine html machine trap delegation registers medeleg and mideleg mideleg needs to be configured orrectly to delegate machine mode interrupts to supervisor mode from opensbi log https lupyuen github io articles linux appendix opensbi log for star64 we see the value of mideleg bash boot hart mideleg 0x0000000000000222 boot hart medeleg 0x000000000000b109 mideleg is defined by the following bits csr h https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v include csr h l343 l346 c define mip ssip 0x1 1 define mip stip 0x1 5 define mip mtip 0x1 7 define mip seip 0x1 9 so boot hart mideleg 0x0000000000000222 means ssip delegate supervisor software interrupt stip delegate supervisor timer interrupt seip delegate supervisor external interrupt but not mtip delegate machine timer interrupt thus we re good the interrupts should be correctly delegated from machine mode to supervisor mode for nuttx fyi this is same for nuttx sbi nuttsbi sbi start c https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v src nuttsbi sbi start c l91 l94 c delegate interrupts reg mip ssip mip stip mip seip write csr mideleg reg delegate exceptions all of them reg 1 riscv irq iamisaligned 1 riscv irq instructionpf 1 riscv irq loadpf 1 riscv irq storepf 1 riscv irq ecallu write csr medeleg reg sifive interrupt cookbook https sifive cdn prismic io sifive 0d163928 2128 42be a75a 464df65e04e0 sifive interrupt cookbook pdf states the machine vs supervisor interrupt ids machine mode interrupts software interrupt interrupt id 3 timer interrupt interrupt id 7 external interrupt interrupt id 11 supervisor mode interrupts software interrupt interrupt id 1 timer interrupt interrupt id 5 external interrupt interrupt id 9 nuttx star64 handles uart interrupts read the article star64 jh7110 nuttx rtos risc v plic interrupts and serial i o https lupyuen github io articles plic after fixing plic interrupts on star64 are uart interrupts ok uart interrupts at risc v irq 32 nuttx irq 57 are now ok yay but still no uart output though text 123067bcnx start entry up irq enable up enable irq irq 17 up enable irq riscv irq soft 17 uart register registering dev console uart register registering dev ttys0 up enable irq irq 57 up enable irq extirq 32 riscv irq ext 25 riscv doirq irq 57 riscv doirq irq 57 riscv doirq irq 57 riscv doirq irq 57 riscv doirq irq 57 riscv doirq irq 57 riscv doirq irq 57 riscv doirq irq 57 riscv doirq irq 57 nx start cpu0 beginning idle loop and nuttx detects the uart input interrupts when we type yay text 123067bcnx start entry up irq enable up enable irq irq 17 up enable irq riscv irq soft 17 uart register registering dev console uart register registering dev ttys0 up enable irq irq 57 up enable irq extirq 32 riscv irq ext 25 u16550 rxint enable 1 056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789056789w056789o056789r056789k056789 056789s056789t056789a056789r056789t056789 056789l056789o056789w056789p056789r056789i056789 056789 056789s056789t056789a056789r056789056789t056789i056789n056789g056789 056789l056789o056789w056789 056789p056789r056789i056789o056789r056789i056789t056789y056789 056789k056789e056789r056789n056789e056789l056789 056789w056789o056789r056789k056789e056789r056789 056789t056789h056789r056789e 056789a 056789d 056789 056789s 056789 056789 means uart input interrupt https github com lupyuen2 wip pinephone nuttx blob star64d drivers serial uart 16550 c l965 l978 but why is uart interrupt triggered repeatedly with uart iir intstatus 0 https github com lupyuen2 wip pinephone nuttx blob star64d drivers serial uart 16550 c l954 l966 is it because we didn t complete a risc v interrupt correctly what happens if we don t complete an interrupt completing an interrupt happens here qemu rv irq dispatch c https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v src qemu rv qemu rv irq dispatch c l81 l88 c if riscv irq ext irq then write plic claim to clear pending in plic putreg32 irq riscv irq ext qemu rv plic claim if we don t complete an interrupt we won t receive any subsequent interrupts like uart input text 123067bcnx start entry up irq enable up enable irq irq 17 up enable irq riscv irq soft 17 uart register registering dev console uart register registering dev ttys0 up enable irq irq 57 up enable irq extirq 32 riscv irq ext 25 u16550 rxint enable 1 work start lowpri starting low priority kernel worker thread s board late initialize nx start application starting init task system bin init elf symname symbol has no name elf symvalue shn undef failed to get symbol name 3 elf relocateadd section 2 reloc 2 undefined symbol 0 has no name 3 nx start application ret 3 up exit tcb 0x404088d0 exiting uart write 0xc0200428 0000 2a 2a 2a 6d 61 69 6e 0a main u16550 txint enable 0 aaaaaaaaau16550 txint enable 1 duart write 0xc000a610 0000 0a 4e 75 74 74 53 68 65 6c 6c 20 28 4e 53 48 29 nuttshell nsh 0010 20 4e 75 74 74 58 2d 31 32 2e 30 2e 33 0a nuttx 12 0 3 u16550 txint enable 0 aaaaaaaaaaaaaaau16550 txint enable 1 duart write 0xc0015338 0000 6e 73 68 3e 20 nsh u16550 txint enable 0 aaaaau16550 txint enable 1 duart write 0xc0015310 0000 1b 5b 4b k u16550 txint enable 0 aaau16550 txint enable 1 du16550 rxint enable 0 u16550 rxint enable 1 nx start cpu0 beginning idle loop no response to uart input so it seems we are completing interrupts correctly we checked the other risc v nuttx ports they claim and complete interrupts the exact same way are we completing the interrupt too soon maybe we should slow down let s slow down the interrupt completion with a logging delay qemu rv irq dispatch c https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v src qemu rv qemu rv irq dispatch c l81 l88 c if riscv irq ext irq info irq d riscv irq ext d n irq riscv irq ext then write plic claim to clear pending in plic putreg32 irq riscv irq ext qemu rv plic claim seems to work better text 123067bcnx start entry up irq enable up enable irq irq 17 up enable irq riscv irq soft 17 uart register registering dev console uart register registering dev ttys0 up enable irq irq 57 up enable irq extirq 32 riscv irq ext 25 u16550 rxint enable 1 riscv dispatch irq irq 57 riscv irq ext 25 056789riscv dispatch irq irq 57 riscv irq ext 25 riscv dispatch irq irq 57 riscv irq ext 25 riscv dispatch irq irq 57 riscv irq ext 25 riscv dispatch irq irq 57 riscv irq ext 25 riscv dispatch irq irq 57 riscv irq ext 25 riscv dispatch irq irq 57 riscv irq ext 25 riscv dispatch irq irq 57 riscv irq ext 25 nx start cpu0 beginning idle loop also we increase the system delay to match pinephone system type delay loops per millisecond 116524 bash config board loopspermsec 116524 source https github com lupyuen2 wip pinephone nuttx blob star64d boards risc v qemu rv rv virt configs knsh64 defconfig l47 uart might need some time to warm up maybe we enable the irq later let s delay the enabling of irq to later we comment out the enable irq in uart 16550 c https github com lupyuen2 wip pinephone nuttx blob star64d drivers serial uart 16550 c l860 l871 c static int u16550 attach struct uart dev s dev attach and enable the irq ret irq attach priv irq u16550 interrupt dev ifndef config arch nointc if ret ok enable the interrupt rx and tx interrupts are still disabled in the uart enable interrupt later up enable irq priv irq and add it to uart write serial c https github com lupyuen2 wip pinephone nuttx blob star64d drivers serial serial c l1177 l1188 c static ssize t uart write far struct file filep far const char buffer size t buflen static int count 0 if count 3 up enable irq 57 seems better text 123067bcnx start entry up irq enable up enable irq irq 17 up enable irq riscv irq soft 17 uart register registering dev console uart register registering dev ttys0 u16550 rxint enable 1 work start lowpri starting low priority kernel worker thread s board late initialize nx start application starting init task system bin init elf symname symbol has no name elf symvalue shn undef failed to get symbol name 3 elf relocateadd section 2 reloc 2 undefined symbol 0 has no name 3 nx start application ret 3 up exit tcb 0x404088d0 exiting uart write 0xc0200428 0000 2a 2a 2a 6d 61 69 6e 0a main up enable irq irq 57 up enable irq extirq 32 riscv irq ext 25 056789056789056789056789056789056789u05678910567896056789505678950567890056789 056789t056789x056789i056789n056789t056789 056789 056789e056789n056789a056789b056789l056789e056789 0567890056789 056789056789056789a056789056789056789056789056789056789056789056789056789056789056789056789056789aaaaa056789aaa056789u05678910567896056789505678950567890056789 056789t056789x056789i056789n056789t056789 056789 056789e056789n056789a056789b056789l056789e056789 0567891056789 056789d d d d d d d d d d d d d d d d d d d d d d d d d d d d after removing the logs nsh works ok yay watch what happens when we enter ls at the nsh shell watch the demo on youtube https youtu be tdsjdiqfsv8 nsh on star64 https lupyuen github io images plic nsh2 png text 123067bcnx start entry up irq enable up enable irq irq 17 up enable irq riscv irq soft 17 uart register registering dev console uart register registering dev ttys0 work start lowpri starting low priority kernel worker thread s board late initialize nx start application starting init task system bin init elf symname symbol has no name elf symvalue shn undef failed to get symbol name 3 elf relocateadd section 2 reloc 2 undefined symbol 0 has no name 3 nx start application ret 3 up exit tcb 0x404088d0 exiting up enable irq irq 57 up enable irq extirq 32 riscv irq ext 25 main nuttshell nsh nuttx 12 0 3 nsh l s p o s i x s p a w n p i d 0 x c 0 2 0 2 9 7 8 p a t h l s f i l e a c t i o n s 0 x c 0 2 0 2 9 8 0 a t t r 0 x c 0 2 0 2 9 8 8 a r g v 0 x c 0 2 0 2 a 2 8 e x e c s p a w n e r r o r f a i l e d t o l o a d p r o g r a m l s 2 n x p o s i x s p a w n e x e c e r r o r e x e c f a i l e d 2 dev proc system nsh n x s t a r t c p u 0 b e g i n n i n g i d l e l o o p so amazing that nuttx apps and context switching are ok even though we haven t implemented the risc v timer but it s super slow each dot is 1 million calls to the uart interrupt handler with uart interrupt status uart iir intstatus 0 https github com lupyuen2 wip pinephone nuttx blob star64d drivers serial uart 16550 c l954 l966 from uart 16550 c https github com lupyuen2 wip pinephone nuttx blob star64d drivers serial uart 16550 c l948 l967 c get the current uart status and check for loop termination conditions status u16550 serialin priv uart iir offset the uart iir intstatus bit should be zero if there are pending interrupts if status uart iir intstatus 0 break out of the loop when there is no longer a pending interrupt print after every 1 million interrupts static int i 0 if i 1000000 1 volatile uint8 t 0x10000000 todo why is uart interrupt triggered repeatedly with uart iir intstatus 0 https github com lupyuen2 wip pinephone nuttx blob star64d drivers serial uart 16550 c l954 l966 maybe because opensbi is still handling uart interrupts in machine mode we tried to disable plic interrupts for machine mode qemu rv irq c https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v src qemu rv qemu rv irq c l58 l63 c disable all global interrupts for hart 1 machine mode 0x0c00 2080 4b rw start hart 1 m mode interrupt enables define qemu rv plic enable1 mmode qemu rv plic base 0x002080 define qemu rv plic enable2 mmode qemu rv plic base 0x002084 putreg32 0x0 qemu rv plic enable1 mmode putreg32 0x0 qemu rv plic enable2 mmode but we still see spurious uart interrupts todo how does opensbi handle uart i o are the uart interrupts still routed to opensbi can we remove them from opensbi todo robert lipe https twitter com robertlipe status 1685830584688340992 t wtd98qn0wfhucdho6px6gw suggests that we check for floating inputs on the control signals todo throttle interrupts for now in riscv dispatch irq https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v src qemu rv qemu rv irq dispatch c l56 l91 todo did we configure 16550 uart interrupt register correctly todo is nuttx 16550 uart driver any different from linux nuttx boots ok on star64 jh7110 read the article star64 jh7110 nuttx rtos creating the first release for the risc v sbc https lupyuen github io articles release from the previous section we saw that jh7110 triggers too many spurious uart interrupts spurious uart interrupts https lupyuen github io articles plic spurious uart interrupts jh7110 uses a synopsys designware 8250 uart that has a peculiar problem with the line control register lcr if we write to lcr while the uart is busy it will trigger spurious uart interrupts the fix is to wait for the uart to be not busy before writing to lcr here s my proposed patch for the nuttx 16550 uart driver fix the spurious uart interrupts https lupyuen github io articles plic appendix fix the spurious uart interrupts after fixing the spurious uart interrupts now nuttx boots ok on star64 yay nuttx boots ok on star64 jh7110 https lupyuen github io images star64 bootok png text starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled bcnx start entry uart register registering dev console uart register registering dev ttys0 work start lowpri starting low priority kernel worker thread s nx start application starting init task system bin init elf symname symbol has no name elf symvalue shn undef failed to get symbol name 3 elf relocateadd section 2 reloc 2 undefined symbol 0 has no name 3 up exit tcb 0x40409890 exiting nx start cpu0 beginning idle loop nuttshell nsh nuttx 12 0 3 nsh uname a posix spawn pid 0xc0202978 path uname file actions 0xc0202980 attr 0xc0202988 argv 0xc0202a28 exec spawn error failed to load program uname 2 nxposix spawn exec error exec failed 2 nuttx 12 0 3 7a92743 dirty aug 3 2023 18 06 04 risc v star64 nsh ls l posix spawn pid 0xc0202978 path ls file actions 0xc0202980 attr 0xc0202988 argv 0xc0202a28 exec spawn error failed to load program ls 2 nxposix spawn exec error exec failed 2 dr r r 0 dev dr r r 0 proc dr r r 0 system nsh watch the demo video on youtube https youtu be 6vq txxojbq see the complete log https gist github com lupyuen eef8de0817ceed2072b2bacc925cdd96 how did we build nuttx for star64 to build nuttx for star64 install the prerequisites https nuttx apache org docs latest quickstart install html and clone the git repositories https nuttx apache org docs latest quickstart install html for nuttx and apps before building nuttx for star64 download the risc v toolchain riscv64 unknown elf from sifive risc v tools https github com sifive freedom tools releases tag v2020 12 0 add the downloaded toolchain riscv64 unknown elf toolchain bin to the path environment variable check the risc v toolchain bash riscv64 unknown elf gcc v configure the nuttx project and build the project bash cd nuttx tools configure sh star64 nsh make riscv64 unknown elf objcopy o binary nuttx nuttx bin this produces the nuttx kernel nuttx bin next build the nuttx apps filesystem bash make export pushd apps tools mkimport sh z x nuttx nuttx export tar gz make import popd genromfs f initrd d apps bin v nuttxbootvol this generates the initial ram disk initrd download the device tree jh7110 visionfive v2 dtb https github com starfive tech visionfive2 releases download vf2 v3 1 5 jh7110 visionfive v2 dtb from starfive visionfive2 software releases https github com starfive tech visionfive2 releases into the nuttx folder now we create a bootable microsd see the build outputs https github com lupyuen2 wip pinephone nuttx releases tag jh7110b 0 0 1 see the build steps https github com lupyuen2 wip pinephone nuttx releases tag jh7110b 0 0 1 see the build log https gist github com lupyuen c6dc9aeec74d399029ebaf46ac16ef79 bootable microsd for nuttx read the article star64 jh7110 nuttx rtos creating the first release for the risc v sbc https lupyuen github io articles release how do we create a bootable microsd for nuttx from the previous section we have the nuttx kernel nuttx bin initial ram disk initrd and device tree jh7110 visionfive v2 dtb we ll pack all 3 files into a flat image tree fit inside the nuttx folder create a text file named nuttx its with the following content nuttx its https github com lupyuen nuttx star64 blob main nuttx its text dts v1 description nuttx fit image address cells 2 images vmlinux description vmlinux data incbin nuttx bin type kernel arch riscv os linux load 0x0 0x40200000 entry 0x0 0x40200000 compression none ramdisk description buildroot initramfs data incbin initrd type ramdisk arch riscv os linux load 0x0 0x46100000 compression none hash 1 algo sha256 fdt data incbin jh7110 visionfive v2 dtb type flat dt arch riscv load 0x0 0x46000000 compression none hash 1 algo sha256 configurations default nuttx nuttx description nuttx kernel vmlinux fdt fdt loadables ramdisk based on visionfive2 fit image its https github com starfive tech visionfive2 blob jh7110 visionfive2 devel conf visionfive2 fit image its package the nuttx kernel initial ram disk and device tree into a flat image tree bash for macos brew install u boot tools for linux sudo apt install u boot tools generate fit image from nuttx bin initrd and jh7110 visionfive v2 dtb nuttx its must be in the same directory as the nuttx binaries mkimage f nuttx its a riscv o linux t flat dt starfiveu fit to check fit image mkimage l starfiveu fit we will see text mkimage f nuttx its a riscv o linux t flat dt starfiveu fit fit description nuttx fit image created fri aug 4 23 20 52 2023 image 0 vmlinux description vmlinux created fri aug 4 23 20 52 2023 type kernel image compression uncompressed data size 2097800 bytes 2048 63 kib 2 00 mib architecture risc v os linux load address 0x40200000 entry point 0x40200000 image 1 ramdisk description buildroot initramfs created fri aug 4 23 20 52 2023 type ramdisk image compression uncompressed data size 8086528 bytes 7897 00 kib 7 71 mib architecture risc v os linux load address 0x46100000 entry point unavailable hash algo sha256 hash value 44b3603e6e611ade7361a936aab09def23651399d4a0a3c284f47082d788e877 image 2 fdt description unavailable created fri aug 4 23 20 52 2023 type flat device tree compression uncompressed data size 50235 bytes 49 06 kib 0 05 mib architecture risc v load address 0x46000000 hash algo sha256 hash value 42767c996f0544f513280805b41f996446df8b3956c656bdbb782125ae8ffeec default configuration nuttx220569 configuration 0 nuttx220569 description nuttx kernel vmlinux fdt fdt loadables ramdisk the flat image tree starfiveu fit will be copied to a microsd card in the next step to prepare the microsd card download the microsd image sdcard img https github com starfive tech visionfive2 releases download vf2 v3 1 5 sdcard img from starfive visionfive2 software releases https github com starfive tech visionfive2 releases write the downloaded image to a microsd card with balena etcher https www balena io etcher or gnome disks https wiki gnome org apps disks copy the file starfiveu fit from the previous section and overwrite the file on the microsd card bash copy to microsd cp starfiveu fit volumes no name ls l volumes no name starfiveu fit unmount microsd todo verify that dev disk2 is microsd diskutil unmountdisk dev disk2 check that star64 is connected to our computer via a usb serial adapter insert the microsd card into star64 and power up star64 nuttx boots on star64 and nuttshell nsh appears in the serial console to see the available commands in nuttshell bash help booting nuttx over tftp https lupyuen github io articles tftp is also supported on star64 see the build outputs https github com lupyuen2 wip pinephone nuttx releases tag jh7110b 0 0 1 see the build steps https github com lupyuen2 wip pinephone nuttx releases tag jh7110b 0 0 1 see the build log https gist github com lupyuen c6dc9aeec74d399029ebaf46ac16ef79 more about flat image tree flattened image tree fit format https u boot readthedocs io en latest usage fit source file format html single kernel and fdt blob https u boot readthedocs io en latest usage fit kernel fdt html multiple kernels ramdisks and fdt blobs https u boot readthedocs io en latest usage fit multi html todo why use sdcard img add star64 jh7110 arch and board to nuttx read the article star64 jh7110 nuttx rtos creating the first release for the risc v sbc https lupyuen github io articles release how did we add star64 jh7110 to nuttx as a new arch and board we added star64 jh7110 to nuttx with 3 pull requests 1 first we fix any dependencies needed by star64 jh7110 this pr fixes the 16550 uart driver used by jh7110 fix 16550 uart https github com apache nuttx pull 10019 1 next we submit the pr that implements the jh7110 soc as a nuttx arch add support for jh7110 soc https github com apache nuttx pull 10069 we add jh7110 to the kconfig for the risc v socs arch risc v kconfig https github com apache nuttx pull 10069 files diff 9c348f27c59e1ed0d1d9c24e172d233747ee09835ab0aa7f156da1b7caa6a5fb and we create a kconfig for jh7110 arch risc v src jh7110 kconfig https github com apache nuttx pull 10069 files diff 36a3009882ced77a24e9a7fd7ce3cf481ded4655f1adc366e7722a87ceab293b then we add the source files for jh7110 at arch risc v src jh7110 https github com apache nuttx tree master arch risc v src jh7110 1 finally we submit the pr that implements star64 sbc as a nuttx board add support for star64 sbc https github com lupyuen2 wip pinephone nuttx pull 40 we add star64 to the kconfig for the nuttx boards nuttx boards kconfig https github com lupyuen2 wip pinephone nuttx pull 38 files diff 60cc096e3a9b22a769602cbbc3b0f5e7731e72db7b0338da04fcf665ed753b64 we create a kconfig for star64 nuttx boards risc v jh7110 star64 kconfig https github com lupyuen2 wip pinephone nuttx pull 38 files diff 76f41ff047f7cc79980a18f527aa05f1337be8416d3d946048b099743f10631c and we add the source files for star64 at boards risc v jh7110 star64 https github com apache nuttx tree master boards risc v jh7110 star64 1 in the same pr update the nuttx docs add jh7110 and star64 to the list of supported platforms documentation introduction detailed support rst https github com lupyuen2 wip pinephone nuttx pull 38 files diff d8a0e68fcb8fcb7e919c4b01226b6a25f888ed297145b82c719875cf8e6f5ae4 supported platforms https lupyuen github io images release doc3 png create a page for the jh7110 nuttx arch documentation platforms risc v jh7110 index rst https github com lupyuen2 wip pinephone nuttx pull 38 files diff 79d8d013e3cbf7600551f1ac23beb5db8bd234a0067576bfe0997b16e5d5c148 jh7110 arch https lupyuen github io images release doc2 png under jh7110 create a page for the star64 nuttx board documentation platforms risc v jh7110 boards star64 index rst https github com lupyuen2 wip pinephone nuttx pull 38 files diff a57fa454397c544c8a717c35212a88d3e3e0c77c9c6e402f5bb52dfeb62e1349 star64 board https lupyuen github io images release doc1 png seems we need to copy a bunch of source files across branches no sweat suppose we created a staging pr in our own repo github com lupyuen2 wip pinephone nuttx pull 40 https github com lupyuen2 wip pinephone nuttx pull 40 this command produces a list of changed files bash todo change this to your pr pr https github com lupyuen2 wip pinephone nuttx pull 40 curl l pr diff grep diff git sort cut d f3 cut c3 like this text boards risc v jh7110 star64 include board h boards risc v jh7110 star64 include board memorymap h boards risc v jh7110 star64 scripts make defs boards risc v jh7110 star64 scripts ld script that we can copy to another branch in a script bash b home new branch mkdir p b boards risc v jh7110 star64 include mkdir p b boards risc v jh7110 star64 scripts a boards risc v jh7110 star64 include board h cp a b a a boards risc v jh7110 star64 include board memorymap h cp a b a a boards risc v jh7110 star64 scripts make defs cp a b a a boards risc v jh7110 star64 scripts ld script cp a b a how did we generate the nuttx build configuration the nuttx build configuration for star64 is at boards risc v jh7110 star64 configs nsh defconfig https github com lupyuen2 wip pinephone nuttx pull 40 files diff cdbd91013d0074f15d469491b707d1d6576752bd7b7b9ec6ed311edba8ab4b53 we generated the defconfig with this command bash make menuconfig make savedefconfig grep v config host defconfig boards risc v jh7110 star64 configs nsh defconfig during development we should enable additional debug options text config debug assertions y config debug assertions expression y config debug binfmt y config debug binfmt error y config debug binfmt warn y config debug error y config debug features y config debug fs y config debug fs error y config debug fs warn y config debug fullopt y config debug info y config debug mm y config debug mm error y config debug mm warn y config debug sched y config debug sched error y config debug sched info y config debug sched warn y config debug symbols y config debug warn y binfmt is the binary loader good for troubleshooting nuttx app elf loading issues sched is for task scheduler which will show the spawning of nuttx app tasks mm is for memory management for troubleshooting memory mapping issues fs is for file system before merging with nuttx mainline remove the binfmt fs mm and sched debug options todo gpio next starfive visionfive2 software release read the article star64 jh7110 nuttx rtos creating the first release for the risc v sbc https lupyuen github io articles release starfive visionfive2 software releases seem to boot ok on star64 visionfive2 software releases https github com starfive tech visionfive2 releases sd card image https github com starfive tech visionfive2 releases download vf2 v3 1 5 sdcard img see the boot log for star64 https gist github com lupyuen 030e4feb2fa95319290f3027032c24a8 login with text buildroot login root password starfive based on the files above we figured out how to generate the flat image tree for nuttx makefile https github com starfive tech visionfive2 blob jh7110 visionfive2 devel makefile l279 l283 also we see the script that generates the sd card image genimage sh https github com starfive tech visionfive2 blob jh7110 visionfive2 devel genimage sh bash genimage rootpath rootpath tmp tmppath genimage tmp inputpath input dir outputpath output dir config genimage vf2 cfg the sd card partitions are defined in genimage vf2 cfg https github com starfive tech visionfive2 blob jh7110 visionfive2 devel conf genimage vf2 cfg text image sdcard img hdimage gpt true partition spl image work u boot spl bin normal out partition type uuid 2e54b353 1271 4842 806f e436d6af6985 offset 2m size 2m partition uboot image work visionfive2 fw payload img partition type uuid 5b193300 fc78 40cd 8002 e86c45580b47 offset 4m size 4m partition image partition type 0xc partition type uuid ebd0a0a2 b9e5 4433 87c0 68b6b72699c7 image work starfive visionfive2 vfat part offset 8m size 292m partition root partition type 0x83 partition type uuid 0fc63daf 8483 4772 8e79 3d69d8477de4 image work buildroot rootfs images rootfs ext4 offset 300m bootable true useful for creating our own sd card partitions we won t need the spl uboot and root partitions for nuttx uart clock for jh7110 read the article star64 jh7110 nuttx rtos creating the first release for the risc v sbc https lupyuen github io articles release how did we figure out the uart clock for jh7110 bash config 16550 uart0 clock 23040000 source https github com lupyuen2 wip pinephone nuttx blob 57d5bba4723b58c7bb947f9fa206be377c80c8d0 boards risc v jh7110 star64 configs nsh defconfig l10 l18 we logged the values of dlm and dll in the uart driver during startup c uint32 t dlm u16550 serialin priv uart dlm offset uint32 t dll u16550 serialin priv uart dll offset we capture dlm and dll only when dlab 1 https github com apache nuttx blob master drivers serial uart 16550 c l817 l851 be careful to print only when dlab 0 according to our log dlm is 0 and dll is 13 which means text dlm 0 div 8 dll 13 div 0xff which gives div 13 now since baud 115200 at startup text div uartclk baud 3 baud 4 13 uartclk 921600 1843200 uartclk 13 1843200 921600 23040000 thus uartclk 23040000 and that s why we set bash config 16550 uart0 clock 23040000 source https github com lupyuen2 wip pinephone nuttx blob 57d5bba4723b58c7bb947f9fa206be377c80c8d0 boards risc v jh7110 star64 configs nsh defconfig l10 l18 hdmi display for star64 jh7110 read the article risc v star64 jh7110 inside the display controller https lupyuen github io articles display2 will nuttx work with the hdmi display on star64 let s find out maybe our hdmi code will be reused for pinetab v s mipi dsi display panel here are the official docs display subsystem https doc en rvspace org jh7110 trm jh7110 trm display subsystem html sdk for hdmi http doc en rvspace org visionfive2 dg hdmi display controller developing guide http doc en rvspace org visionfive2 dg display gpu developing and porting guide http doc en rvspace org visionfive2 dg gpu multimedia developing guide http doc en rvspace org visionfive2 dg multimedia mipi lcd developing and porting guide http doc en rvspace org visionfive2 dg lcd from the docs above we have the display subsystem block diagram https doc en rvspace org jh7110 trm jh7110 trm block diagram display html display subsystem block diagram https doc en rvspace org jh7110 trm image rd jh7110 vout block diagram18 png source https doc en rvspace org jh7110 trm jh7110 trm block diagram display html which says that jh7110 uses a dc8200 dual display controller to drive the mipi dsi and hdmi displays but the dc8200 docs are confidential sigh https doc en rvspace org jh7110 trm jh7110 trm detail info display html and we have the display subsystem clock and reset https doc en rvspace org jh7110 trm jh7110 trm clock n reset display html display subsystem clock and reset https doc en rvspace org jh7110 trm image rd jh7110 vout clkrst18 png source https doc en rvspace org jh7110 trm jh7110 trm clock n reset display html so to make hdmi work on jh7110 we need a create a nuttx driver for the dc8200 display controller dc8200 display controller for star64 jh7110 read the article risc v star64 jh7110 inside the display controller https lupyuen github io articles display2 let s talk about the dc8200 dual display controller but the dc8200 docs are confidential sigh https doc en rvspace org jh7110 trm jh7110 trm detail info display html here s the block diagram of dc8200 display controller https doc en rvspace org visionfive2 dg display jh7110 sdk block diagram display html block diagram of dc8200 display controller https doc en rvspace org visionfive2 dg display image jh7110 sdk display block diagram png source https doc en rvspace org visionfive2 dg display jh7110 sdk block diagram display html display devices refer to mipi dphy and hdmi interchangeable here are the linux drivers for dc8200 display controller https doc en rvspace org visionfive2 dg display jh7110 sdk source code structure display html vs dc c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c display controller vs dc hw c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c framebuffer and overlay similar to a64 display engine vs drv c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs drv c device for direct rendering manager vs crtc c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs crtc c display pipeline colour gamma lut vs plane c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs plane c display plane vs simple enc c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs simple enc c display subsystem dss https software dl ti com processor sdk linux esd docs 06 03 00 106 linux foundational components kernel kernel drivers display dss html encoder vs gem c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs gem c graphics execution manager https en wikipedia org wiki direct rendering manager graphics execution manager memory management framework vs virtual c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs virtual c virtual display vs dc dec c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc dec c bitmap decompression see the notes here https github com starfive tech linux tree jh7110 visionfive2 devel drivers gpu drm verisilicon we ll see the call flow in a while are these used vs dc mmu c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc mmu c memory mapping vs fb c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs fb c gem memory mapping for framebuffer here s the partial linux device tree for dc8200 https doc en rvspace org visionfive2 dg display jh7110 sdk device tree config display html text dc8200 status okay dc out port address cells 1 size cells 0 dc out dpi0 endpoint 0 reg 0 remote endpoint hdmi input0 dc out dpi1 endpoint 1 reg 1 remote endpoint hdmi in lcdc dc out dpi2 endpoint 2 reg 2 remote endpoint mipi in source https doc en rvspace org visionfive2 dg display jh7110 sdk device tree config display html hdmi i2c encoder in jh7110 is the nxp semiconductors tda998x hdmi encoder https doc en rvspace org visionfive2 dg display jh7110 sdk kernel menu config diplay html next we need to create a nuttx driver for the hdmi controller hdmi controller for star64 jh7110 the hdmi controller for jh7110 is inno hdmi 2 0 transmitter for tsmc28hpc https doc en rvspace org jh7110 trm jh7110 trm detail info display html based on jh7110 hdmi developing guide https doc en rvspace org visionfive2 dg hdmi jh7110 sdk source code structure hdmi html the linux drivers for jh7110 hdmi verisilicon inno hdmi are inno hdmi c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon inno hdmi c inno hdmi h https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon inno hdmi h the linux device tree https doc en rvspace org visionfive2 dg hdmi jh7110 sdk device tree hdmi html looks like text hdmi hdmi 29590000 compatible starfive jh7100 hdmi inno hdmi reg 0x0 0x29590000 0x0 0x4000 interrupts 99 status disabled clocks clkvout jh7110 u0 hdmi tx clk sys clkvout jh7110 u0 hdmi tx clk mclk clkvout jh7110 u0 hdmi tx clk bclk hdmitx0 pixelclk clock names sysclk mclk bclk pclk resets rstgen rstn u0 hdmi tx hdmi reset names hdmi tx hdmi status okay pinctrl names default pinctrl 0 inno hdmi pins hdmi in port address cells 1 size cells 0 hdmi in lcdc endpoint 0 reg 0 remote endpoint dc out dpi1 source https doc en rvspace org visionfive2 dg hdmi jh7110 sdk device tree hdmi html we see the hdmi initialization process https doc en rvspace org visionfive2 dg hdmi jh7110 sdk initialization process html hdmi initialization process https doc en rvspace org visionfive2 dg hdmi image jh7110 sdk hdmi init svg source https doc en rvspace org visionfive2 dg hdmi jh7110 sdk initialization process html and the hdmi plug and unplug process https doc en rvspace org visionfive2 dg hdmi jh7110 sdk plug n unplug process html hdmi plug and unplug process https doc en rvspace org visionfive2 dg hdmi image jh7110 sdk hdmi pug unplug svg source https doc en rvspace org visionfive2 dg hdmi jh7110 sdk plug n unplug process html test hdmi for star64 jh7110 how will we test the hdmi display for star64 jh7110 we run the modetest command to test hdmi https doc en rvspace org visionfive2 dg display jh7110 sdk test example display html bash modetest m starfive d 0 a s 116 31 1920x1080 p 39 31 1920x1080 rg16 ftiles source https doc en rvspace org visionfive2 dg display jh7110 sdk test example display html 116 31 1920x1080 means connector id crtc id resolution 39 31 1920x1080 rg16 means plane id crtc id resolution format crtc crt controller refers to the display pipeline https en wikipedia org wiki direct rendering manager kms device model see also before debug https doc en rvspace org visionfive2 dg display jh7110 sdk before debug html debug display https doc en rvspace org visionfive2 dg display jh7110 sdk debug hdmi html todo what s inside the modetest app modetest c https gitlab freedesktop org mesa drm blob main tests modetest modetest c todo what parameters does modetest pass to the dc8200 driver todo can we create a simpler modetest for our own testing on nuttx direct rendering manager driver for dc8200 read the article risc v star64 jh7110 inside the display controller https lupyuen github io articles display2 jh7110 linux display driver https lupyuen github io images jh7110 display jpg let s walk through the code in the linux driver for dc8200 display controller to understand how we ll implement it in nuttx the drm driver is named starfive c name starfive static struct platform driver vs drm platform driver probe vs drm platform probe remove vs drm platform remove source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs drv c l448 l457 here are the drm operations supported by the driver c static struct drm driver vs drm driver driver features driver modeset driver atomic driver gem lastclose drm fb helper lastclose prime handle to fd drm gem prime handle to fd prime fd to handle drm gem prime fd to handle gem prime import vs gem prime import gem prime import sg table vs gem prime import sg table gem prime mmap vs gem prime mmap dumb create vs gem dumb create ifdef config debug fs debugfs init vs debugfs init endif fops fops name starfive desc verisilicon drm driver date 20191101 major drv major minor drv minor source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs drv c l125 l143 the drm driver includes these sub drivers c static struct platform driver drm sub drivers put display control driver at start dc platform driver connector ifdef config starfive inno hdmi inno hdmi driver endif simple encoder driver ifdef config verisilicon virtual display virtual display platform driver endif source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs drv c l301 l315 more about dc platform driver https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l1642 l1649 in the next section vs drm init https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs drv c l459 l472 registers drm sub drivers https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs drv c l301 l315 and vs drm platform driver https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs drv c l448 l457 at startup here are the file operations supported by the drm driver c static const struct file operations fops owner this module open drm open release drm release unlocked ioctl drm ioctl compat ioctl drm compat ioctl poll drm poll read drm read mmap vs gem mmap source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs drv c l54 l63 more about direct rendering manager https en wikipedia org wiki direct rendering manager justin fishwaldo suggests that we check out the simpler hdmi driver in u boot https fosstodon org fishwaldo 110902984442385966 call flow for dc8200 display controller driver read the article risc v star64 jh7110 inside the display controller https lupyuen github io articles display2 the dc8200 controller driver is named vs dc for verisilicon c name vs dc struct platform driver dc platform driver probe dc probe remove dc remove source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l1642 l1649 probe for display controller is implemented here dc probe https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l1595 l1629 we see the component functions exposed by the driver c const struct component ops dc component ops bind dc bind unbind dc unbind source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l1584 l1587 bind to display controller is here dc bind https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l1421 l1573 which calls dc init https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l644 l722 which calls dc hw init https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1301 l1361 here are the display pipeline crtc https www kernel org doc html v4 15 gpu drm kms html functions exposed by the driver c static const struct vs crtc funcs dc crtc funcs enable vs dc enable disable vs dc disable mode fixup vs dc mode fixup set gamma vs dc set gamma enable gamma vs dc enable gamma enable vblank vs dc enable vblank commit vs dc commit source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l1400 l1408 enable display pipeline is implemented here vs dc enable https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l740 l826 which calls dc hw setup display https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1480 l1487 enable display pipeline vs dc enable https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l740 l826 is called by vs crtc atomic enable https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs crtc c l265 l276 which is called by drm atomic helper https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm drm atomic helper c l1323 l1408 c static const struct drm crtc helper funcs vs crtc helper funcs mode fixup vs crtc mode fixup atomic enable vs crtc atomic enable atomic disable vs crtc atomic disable atomic begin vs crtc atomic begin atomic flush vs crtc atomic flush source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs crtc c l338 l344 commit display pipeline is here vs dc commit https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l1381 l1398 which calls dc hw commit https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l2038 l2076 commit display pipeline vs dc commit https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l1381 l1398 is called by vs crtc atomic flush https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs crtc c l320 l336 which is called by drm atomic helper https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm drm atomic helper c l2445 l2570 these are the exposed functions for the display plane c static const struct vs plane funcs dc plane funcs update vs dc update plane disable vs dc disable plane check vs dc check plane source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l1410 l1414 update display plane is here vs dc update plane https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l1262 l1280 which calls update plane https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l1153 l1196 which calls dc hw update plane https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1368 l1399 update display plane vs dc update plane https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc c l1262 l1280 is called by vs plane atomic update https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs plane c l268 l301 which is called by drm atomic helper https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm drm atomic helper c l2445 l2570 c const struct drm plane helper funcs vs plane helper funcs atomic check vs plane atomic check atomic update vs plane atomic update atomic disable vs plane atomic disable source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs plane c l314 l318 refer to linux drm internals https www kernel org doc html v4 15 gpu drm internals html call flow for dc8200 display hardware driver read the article risc v star64 jh7110 inside the display controller https lupyuen github io articles display2 display planes info dc hw planes https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l472 l1084 display controller info dc info https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1086 l1150 initialise display hardware dc hw init https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1301 l1361 read the hardware revision and chip id initialise every layer display plane initialise every panel cursor commit display hardware dc hw commit https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l2038 l2076 call gamma ex commit https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1548 l1574 call plane ex commit https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1768 l1863 update cursor update qos update display plane dc hw update plane https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1368 l1399 copy framebuffer copy scale copy position copy blend display hardware functions c static const struct dc hw funcs hw func gamma gamma ex commit plane plane ex commit display setup display ex source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l2032 l2036 setup display upper level dc hw setup display https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1480 l1487 copy display struct call setup display ex https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1971 l2030 setup display extended setup display ex https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1971 l2030 set colour format call setup display https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1865 l1969 setup display lower level setup display https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1865 l1969 set dpi config disable display panel set display horizontal resolution set display horizontal sync set display vertical resolution set display vertical resolution sync configure framebuffer sync mode set framebuffer background colour set display dither enable display panel set overlay config set cursor config commit display plane extended plane ex commit https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1768 l1863 set colour space set gamma call plane commit https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1576 l1766 commit display plane plane commit https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1576 l1766 for every layer display plane set framebuffer yuv address set framebuffer yuv stride set framebuffer width and height clear framebuffer set primary framebuffer config set non primary framebuffer config enable framebuffer scaling x and y set framebuffer offset x and y set framebuffer blending set colour key transparency set roi plane ex commit https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1768 l1863 and gamma ex commit https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1548 l1574 are called by dc hw commit https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l2038 l2076 call flow for dc8200 framebuffer driver read the article risc v star64 jh7110 inside the display controller https lupyuen github io articles display2 at startup vs drm bind https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs drv c l193 l271 calls vs mode config init https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs fb c l178 l191 to register the framebuffer driver vs mode config funcs https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs fb c l166 l172 which is defined as c static const struct drm mode config funcs vs mode config funcs fb create vs fb create get format info vs get format info output poll changed drm fb helper output poll changed atomic check drm atomic helper check atomic commit drm atomic helper commit source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs fb c l166 l172 vs fb create https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs fb c l60 l123 is called by drm framebuffer https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm drm framebuffer c l286 l329 vs get format info https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs fb c l155 l164 is called by drm fourcc https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm drm fourcc c l302 l325 framebuffer formats vs formats https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs fb c l134 l139 call flow for dc8200 virtual display driver todo c static const struct drm connector helper funcs vd connector helper funcs get modes vd get modes mode valid vd mode valid best encoder vd best encoder source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs virtual c l197 l201 display resolutions vd get modes https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs virtual c l153 l181 c static const struct drm connector funcs vd connector funcs fill modes drm helper probe single connector modes destroy vd connector destroy detect vd connector detect atomic duplicate state drm atomic helper connector duplicate state atomic destroy state drm atomic helper connector destroy state reset drm atomic helper connector reset source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs virtual c l215 l222 c const struct component ops vd component ops bind vd bind unbind vd unbind source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs virtual c l311 l314 c name vs virtual display struct platform driver virtual display platform driver probe vd probe remove vd remove source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs virtual c l353 l360 display pipelines c static const struct drm crtc funcs vs crtc funcs set config drm atomic helper set config destroy vs crtc destroy page flip drm atomic helper page flip reset vs crtc reset atomic duplicate state vs crtc atomic duplicate state atomic destroy state vs crtc atomic destroy state atomic set property vs crtc atomic set property atomic get property vs crtc atomic get property gamma set drm atomic helper legacy gamma set late register vs crtc late register enable vblank vs crtc enable vblank disable vblank vs crtc disable vblank source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs crtc c l207 l220 simple encoder driver c name vs simple encoder struct platform driver simple encoder driver probe encoder probe remove encoder remove source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs simple enc c l300 l307 call flow for hdmi controller driver todo c name innohdmi starfive struct platform driver inno hdmi driver probe inno hdmi probe remove inno hdmi remove source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon inno hdmi c l1155 l1163 c static const struct drm encoder helper funcs inno hdmi encoder helper funcs enable inno hdmi encoder enable disable inno hdmi encoder disable mode fixup inno hdmi encoder mode fixup mode set inno hdmi encoder mode set atomic check inno hdmi encoder atomic check source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon inno hdmi c l651 l657 mipi dsi c name dw mipi dsi struct platform driver dw mipi dsi driver probe dsi probe remove dsi remove source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon dw mipi dsi c l1066 l1073 c name cdns dsi static struct platform driver cdns dsi platform driver probe cdns dsi drm probe remove cdns dsi drm remove source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon starfive drm dsi c l1679 l1687 c static const struct component ops dsi component ops bind dsi bind unbind dsi unbind source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon dw mipi dsi c l998 l1001 c static const struct drm bridge funcs dw mipi dsi bridge funcs mode set bridge mode set enable bridge enable post disable bridge post disable attach bridge attach mode fixup bridge mode fixup source https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon dw mipi dsi c l869 l875 lcd panel for star64 jh7110 also in the jh7110 display docs how to connect an lcd panel to jh7110 jh7110 s mipi dsi controller is cadence mipi dsi v1 3 1 tx controller ip dsitx https doc en rvspace org visionfive2 dg lcd jh7110 sdk ic specification lcd html cadence mipi dsi v1 3 1 tx controller ip dsitx https doc en rvspace org visionfive2 dg lcd image jh7110 sdk ic spec png source https doc en rvspace org visionfive2 dg lcd jh7110 sdk ic specification lcd html jh7110 s mipi dphy controller is mipi dphy m31 m31dphyrx611tl028d 00151501 https doc en rvspace org visionfive2 dg lcd jh7110 sdk ic specification lcd html mipi dphy m31 m31dphyrx611tl028d 00151501 https doc en rvspace org visionfive2 dg lcd image jh7110 sdk mipi dphy m31 png source https doc en rvspace org visionfive2 dg lcd jh7110 sdk ic specification lcd html refer to the linux display driver https doc en rvspace org visionfive2 dg lcd jh7110 sdk display driver locations lcd html linux device tree https doc en rvspace org visionfive2 dg lcd jh7110 sdk device tree configuration lcd html see also the sample lcd panel code for seeed lcd panel enable lcd https doc en rvspace org visionfive2 dg lcd jh7110 sdk enable lcd html disable lcd https doc en rvspace org visionfive2 dg lcd jh7110 sdk disable lcd html obtain lcd information https doc en rvspace org visionfive2 dg lcd jh7110 sdk obtain lcd information html here s the lcd initialisation process https doc en rvspace org visionfive2 dg lcd jh7110 sdk initalization lcd html lcd initialisation process https doc en rvspace org visionfive2 dg lcd image jh7110 sdk lcd init svg source https doc en rvspace org visionfive2 dg lcd jh7110 sdk initalization lcd html and the mipi parameter configuration https doc en rvspace org visionfive2 dg lcd jh7110 sdk mipi configuration html for 1c2l 2 lane mipi dsi and 1c4l 4 lane mipi dsi hdmi driver for u boot bootloader read the article risc v star64 jh7110 power up the display controller with u boot bootloader https lupyuen github io articles display3 we re building the nuttx hdmi driver for star64 jh7110 risc v sbc justin fishwaldo https fosstodon org fishwaldo 110902984442385966 suggests that we check out the simpler hdmi driver in u boot bootloader u boot display driver for jh7110 https github com starfive tech u boot tree jh7110 visionfive2 devel drivers video starfive here s our analysis of the display driver in u boot which calls the hdmi driver below sf vop probe https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf vop c l657 l699 call sf vop power https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf vop c l76 l112 vout probe resources jh7110 https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf vop c l250 l367 and sf display init https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf vop c l369 l655 flush the dcache todo who calls sf vop probe https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf vop c l657 l699 sf vop power https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf vop c l76 l112 power on where is the code vout probe resources jh7110 https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf vop c l250 l367 enable clocks noc disp vout src top vout axi top vout ahb dc pix0 dc pix1 dc axi dc core dc ahb hdmitx0 pixelclk deassert resets noc disp rst vout src dc8200 rst axi dc8200 rst core dc8200 rst ahb similar to linux driver vs dc enable https lupyuen github io articles display2 vs dc enable sf display init https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf vop c l369 l655 call dc hw init https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf vop c l237 l248 device probe https github com starfive tech u boot blob jh7110 visionfive2 devel drivers core device c l484 l596 and display enable https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video display uclass c l23 l40 set clock pix src as pix0 s parent set hdmi clock rate pix src write to hdmi registers device probe https github com starfive tech u boot blob jh7110 visionfive2 devel drivers core device c l484 l596 calls inno hdmi probe https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l500 l541 which is explained below display enable https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video display uclass c l23 l40 calls inno hdmi enable https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l444 l457 which is explained below dc hw init https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf vop c l237 l248 read hardware revision and chip id similar to linux driver dc hw init https lupyuen github io articles display2 and here s our analysis of the hdmi driver in u boot inno hdmi probe https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l500 l541 enable hdmi clocks sys clk mclk bclk read hdmi status inno hdmi probe https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l500 l541 is called by device probe https github com starfive tech u boot blob jh7110 visionfive2 devel drivers core device c l484 l596 which is called by sf display init https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf vop c l369 l655 inno hdmi enable https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l444 l457 configure 1920x1080 60hz power on hdmi tx phy and hdmi tdms start data sync call inno hdmi detect https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l32 l58 and inno hdmi tx phy param config https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l389 l425 inno hdmi enable https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l444 l457 is called by display enable https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video display uclass c l23 l40 which is called by sf display init https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf vop c l369 l655 inno hdmi detect https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l32 l58 enable pre pll post pll ldo serializer inno hdmi tx phy param config https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l389 l425 call inno hdmi config 1920x1080p60 https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l245 l288 and inno hdmi tx ctrl https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l376 l387 inno hdmi config 1920x1080p60 https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l245 l288 config pll for 1080p 60hz inno hdmi tx ctrl https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l376 l387 config video format identification code bist mode 0x00 normal mode 0x10 phy mode 0x4 see hdmi read https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l22 l30 and hdmi write https github com starfive tech u boot blob jh7110 visionfive2 devel drivers video starfive sf hdmi c l22 l30 u0 hdmitx base address https doc en rvspace org jh7110 trm jh7110 trm system memory map html is 0x2959 0000 todo is sf vop priv regs hi 0x2940 0000 or 0x2948 0000 here s the device tree for u boot starfive visionfive2 dts https github com starfive tech u boot blob jh7110 visionfive2 devel arch riscv dts starfive visionfive2 dts which includes jh7110 dtsi https github com starfive tech u boot blob jh7110 visionfive2 devel arch riscv dts jh7110 dtsi starfive visionfive2 u boot dtsi https github com starfive tech u boot blob jh7110 visionfive2 devel arch riscv dts starfive visionfive2 u boot dtsi which includes jh7110 u boot dtsi https github com starfive tech u boot blob jh7110 visionfive2 devel arch riscv dts jh7110 u boot dtsi from u boot device tree jh7110 dtsi https github com starfive tech u boot blob jh7110 visionfive2 devel arch riscv dts jh7110 dtsi l1292 l1343 text dc8200 dc8200 29400000 compatible starfive sf dc8200 reg 0x0 0x29400000 0x0 0x100 0x0 0x29400800 0x0 0x2000 reg names hi low status okay clocks clkgen jh7110 noc bus clk disp axi clkgen jh7110 vout src clkgen jh7110 vout top clk vout axi clkgen jh7110 vout top clk vout ahb clkvout jh7110 u0 dc8200 clk pix0 clkvout jh7110 u0 dc8200 clk pix1 clkvout jh7110 u0 dc8200 clk axi clkvout jh7110 u0 dc8200 clk core clkvout jh7110 u0 dc8200 clk ahb clkvout jh7110 dom vout top lcd clk hdmitx0 pixelclk clkvout jh7110 dc8200 pix0 clkvout jh7110 u0 dc8200 clk pix0 out clkvout jh7110 u0 dc8200 clk pix1 out clock names disp axi vout src top vout axi top vout ahb dc pix0 dc pix1 dc axi dc core dc ahb top vout lcd hdmitx0 pixelclk dc8200 pix0 dc8200 pix0 out dc8200 pix1 out resets rstgen rstn u0 dom vout top src rstgen rstn u0 dc8200 axi rstgen rstn u0 dc8200 ahb rstgen rstn u0 dc8200 core rstgen rstn u0 noc bus disp axi n reset names rst vout src rst axi rst ahb rst core rst noc disp u boot clocks and resets mapped nicely clock names clocks disp axi noc disp jh7110 noc bus clk disp axi vout src jh7110 vout src top vout axi jh7110 vout top clk vout axi top vout ahb jh7110 vout top clk vout ahb dc pix0 jh7110 u0 dc8200 clk pix0 dc pix1 jh7110 u0 dc8200 clk pix1 dc axi jh7110 u0 dc8200 clk axi dc core jh7110 u0 dc8200 clk core dc ahb jh7110 u0 dc8200 clk ahb top vout lcd jh7110 dom vout top lcd clk hdmitx0 pixelclk hdmitx0 pixelclk dc8200 pix0 jh7110 dc8200 pix0 dc8200 pix0 out jh7110 u0 dc8200 clk pix0 out dc8200 pix1 out jh7110 u0 dc8200 clk pix1 out reset names resets rst vout src rstn u0 dom vout top src rst axi rstn u0 dc8200 axi rst ahb rstn u0 dc8200 ahb rst core rstn u0 dc8200 core rst noc disp rstn u0 noc bus disp axi n u boot clocks are defined here clk jh7110 c https github com starfive tech u boot blob jh7110 visionfive2 devel drivers clk starfive clk jh7110 c from the linux device tree jh7110 dtsi https github com starfive tech linux blob jh7110 visionfive2 devel arch riscv boot dts starfive jh7110 dtsi l339 l360 text dc8200 dc8200 29400000 compatible starfive jh7110 dc8200 verisilicon dc8200 verisilicon dss syscon dssctrl 20220624 panel syscon reg 0x0 0x29400000 0x0 0x100 0x0 0x29400800 0x0 0x2000 0x0 0x17030000 0x0 0x1000 interrupts 95 status disabled clocks clkgen jh7110 noc bus clk disp axi clkgen jh7110 vout src clkgen jh7110 vout top clk vout axi clkgen jh7110 vout top clk vout ahb clkvout jh7110 u0 dc8200 clk pix0 clkvout jh7110 u0 dc8200 clk pix1 clkvout jh7110 u0 dc8200 clk axi clkvout jh7110 u0 dc8200 clk core clkvout jh7110 u0 dc8200 clk ahb clkgen jh7110 vout top clk vout axi clkvout jh7110 dom vout top lcd clk hdmitx0 pixelclk clkvout jh7110 dc8200 pix0 clkvout jh7110 u0 dc8200 clk pix0 out clkvout jh7110 u0 dc8200 clk pix1 out clock names noc disp vout src top vout axi top vout ahb pix clk vout pix1 axi clk core clk vout ahb vout top axi vout top lcd hdmitx0 pixelclk dc8200 pix0 dc8200 pix0 out dc8200 pix1 out resets rstgen rstn u0 dom vout top src rstgen rstn u0 dc8200 axi rstgen rstn u0 dc8200 ahb rstgen rstn u0 dc8200 core rstgen rstn u0 noc bus disp axi n reset names rst vout src rst axi rst ahb rst core rst noc disp clkvout clock controller 295c0000 compatible starfive jh7110 clk vout reg 0x0 0x295c0000 0x0 0x10000 reg names vout clocks hdmitx0 pixelclk mipitx dphy rxesc mipitx dphy txbytehs clkgen jh7110 vout src clkgen jh7110 vout top clk vout ahb clock names hdmitx0 pixelclk mipitx dphy rxesc mipitx dphy txbytehs vout src vout top ahb resets rstgen rstn u0 dom vout top src reset names vout src clock cells 1 power domains pwrc jh7110 pd vout status okay linux clocks and resets mapped nicely clock names clocks noc disp jh7110 noc bus clk disp axi vout src jh7110 vout src top vout axi jh7110 vout top clk vout axi top vout ahb jh7110 vout top clk vout ahb pix clk jh7110 u0 dc8200 clk pix0 vout pix1 jh7110 u0 dc8200 clk pix1 axi clk jh7110 u0 dc8200 clk axi core clk jh7110 u0 dc8200 clk core vout ahb jh7110 u0 dc8200 clk ahb vout top axi jh7110 vout top clk vout axi vout top lcd jh7110 dom vout top lcd clk hdmitx0 pixelclk hdmitx0 pixelclk dc8200 pix0 jh7110 dc8200 pix0 dc8200 pix0 out jh7110 u0 dc8200 clk pix0 out dc8200 pix1 out jh7110 u0 dc8200 clk pix1 out reset names resets rst vout src rstn u0 dom vout top src rst axi rstn u0 dc8200 axi rst ahb rstn u0 dc8200 ahb rst core rstn u0 dc8200 core rst noc disp rstn u0 noc bus disp axi n see the jh7110 memory map https doc en rvspace org jh7110 trm jh7110 trm memory map display html and control registers https doc en rvspace org jh7110 trm jh7110 trm controller registers display html based on dom vout crg https doc en rvspace org jh7110 trm jh7110 trm dom vout crg html here are the clock registers and the reset register clk u0 dc8200 clk axi offset 0x10 clk u0 dc8200 clk core offset 0x14 clk u0 dc8200 clk ahb offset 0x18 clk u0 dc8200 clk pix0 offset 0x1c clk u0 dc8200 clk pix1 offset 0x20 clk dom vout top lcd clk offset 0x24 clk u0 cdns dsitx clk apb offset 0x28 clk u0 cdns dsitx clk sys offset 0x2c clk u0 cdns dsitx clk dpi offset 0x30 clk u0 cdns dsitx clk txesc offset 0x34 clk u0 mipitx dphy clk txesc offset 0x38 clk u0 hdmi tx clk mclk offset 0x3c clk u0 hdmi tx clk bclk offset 0x40 clk u0 hdmi tx clk sys offset 0x44 software reset assert0 addr assert sel offset 0x38 bit 0 rstn u0 dc8200 rstn axi 1 assert reset 0 de assert reset bit 1 rstn u0 dc8200 rstn ahb 1 assert reset 0 de assert reset bit 2 rstn u0 dc8200 rstn core 1 assert reset 0 de assert reset bit 9 rstn u0 hdmi tx rstn hdmi 1 assert reset 0 de assert reset todo clk u0 dc8200 clk pix0 offset 0x1c bits 24 29 clk mux sel default 0 clock multiplexing selector clk dc8200 pix0 clk hdmitx0 pixelclk what are the values for clk mux sel todo can we read another clock mux to figure this out from clk jh7110 c https github com starfive tech u boot blob jh7110 visionfive2 devel drivers clk starfive clk jh7110 c l77 l80 c static const char u0 dc8200 clk pix sels 2 0 dc8200 pix0 1 hdmitx0 pixelclk clk dm jh7110 u0 dc8200 clk pix0 starfive clk composite priv vout u0 dc8200 clk pix0 u0 dc8200 clk pix sels array size u0 dc8200 clk pix sels vout offset jh7110 u0 dc8200 clk pix0 1 1 0 clk dm jh7110 u0 dc8200 clk pix1 starfive clk composite priv vout u0 dc8200 clk pix1 u0 dc8200 clk pix sels array size u0 dc8200 clk pix sels vout offset jh7110 u0 dc8200 clk pix1 1 1 0 static struct clk starfive clk mux void iomem reg const char name unsigned int offset u8 width const char const parent names u8 num parents return clk register mux null name parent names num parents 0 reg offset starfive clk mux shift width 0 static struct clk starfive clk composite void iomem reg const char name const char const parent names unsigned int num parents unsigned int offset unsigned int mux width unsigned int gate width unsigned int div width struct clk clk err ptr enomem struct clk divider div null struct clk gate gate null struct clk mux mux null int mask arry 4 0x1 0x3 0x7 0xf int mask if mux width if mux width 4 goto fail else mask mask arry mux width 1 mux kzalloc sizeof mux gfp kernel if mux goto fail mux reg reg offset mux mask mask mux shift starfive clk mux shift mux num parents num parents mux flags 0 mux parent names parent names define vout offset id id jh7110 clk vout start 4 define starfive clk mux shift 24 29 24 todo reconcile the above drivers with the official linux driver https lupyuen github io articles display2 todo test on nuttx todo do we really need i2c for testing hdmi poking the star64 jh7110 display controller with u boot bootloader star64 jh7110 display controller is alive https lupyuen github io images display3 title png read the article risc v star64 jh7110 power up the display controller with u boot bootloader https lupyuen github io articles display3 in the olden days we would peek and poke the display controller to see weird and wonderful displays today 46 years later we poke around the display controller of star64 jh7110 sbc with a modern tool not basic u boot bootloader spoiler no weird and wonderful displays for today boot star64 sbc without a microsd card shut down our tftp server we should see the u boot prompt the md command dumps the jh7110 memory ram rom even i o registers text md md memory display usage md b w l q address of objects we can dump the boot rom at 0x2a00 0000 text md 2a000000 2a000000 00000297 12628293 30529073 30005073 b s r0sp 0 2a000010 30405073 41014081 42014181 43014281 sp 0 a a b b c 2a000020 44014381 45014481 46014581 47014681 c d d e e f f g 2a000030 48014781 49014881 4a014981 4b014a81 g h h i i j j k 2a000040 4c014b81 4d014c81 4e014d81 4f014e81 k l l m m n n o 2a000050 01974f81 8193d710 02970ae1 82930000 o 2a000060 907305a2 02933052 85630010 50730402 s r0 c sp 2a000070 22f37c14 02b2f140 d7102117 b8810113 2a000080 40510133 25734581 1d63f140 033704b5 3 q es c 7 2a000090 23b70110 30230110 03210003 fe734de3 0 ms 2a0000a0 f0018293 f0018313 00628e63 f2018393 c b 2a0000b0 00737a63 0002be03 01c33023 032102a1 czs 0 2a0000c0 fe736ae3 f2018313 d7101397 a9838393 js 2a0000d0 00737763 00033023 4de30321 00effe73 cws 0 ms 2a0000e0 a81d61d0 10734621 00733046 26731050 a fs f0s p s 2a0000f0 8a213440 04b7da7d 25730200 1913f140 4 s where is the source code for jh7110 boot rom we can dump the uart registers at 0x1000 0000 text md 10000000 10000000 0000006d 00000000 000000c1 00000003 m 10000010 00000003 00000000 00000000 00000000 10000020 00000000 00000000 00000000 00000000 10000030 00000064 00000064 00000064 00000064 d d d d 10000040 00000064 00000064 00000064 00000064 d d d d 10000050 00000064 00000064 00000064 00000064 d d d d 10000060 00000064 00000064 00000064 00000064 d d d d 10000070 00000000 00000000 00000000 00000003 10000080 00000001 00000000 00000000 00000001 10000090 00000000 00000000 00000001 00000000 100000a0 00000000 00000000 00000000 00000000 100000b0 00000000 00000000 00000000 00000000 100000c0 00000000 00000000 00000000 00000000 100000d0 00000000 00000000 00000000 00000000 100000e0 00000000 00000000 00000000 00000000 100000f0 00000000 00000000 3331342a 44570110 413 wd let s write to uart the mw command writes to jh7110 memory text mw mw memory write fill usage mw b w l q address value count hmmm sounds like a security risk let s poke the uart transmit register at 0x1000 0000 text mw 10000000 2a 1 yep it prints which is ascii code 2a based on the jh7110 system memory map https doc en rvspace org jh7110 trm jh7110 trm system memory map html the display controller registers are at dc8200 ahb0 0x2940 0000 dc8200 ahb1 0x2948 0000 u0 hdmitx 0x2959 0000 vout syscon 0x295b 0000 vout crg 0x295c 0000 dsi tx 0x295d 0000 mipitx dphy 0x295e 0000 but the values are all zero text md 29400000 29400000 00000000 00000000 00000000 00000000 29400010 00000000 00000000 00000000 00000000 md 29480000 29480000 00000000 00000000 00000000 00000000 29480010 00000000 00000000 00000000 00000000 md 29590000 29590000 00000000 00000000 00000000 00000000 29590010 00000000 00000000 00000000 00000000 md 295b0000 295b0000 00000000 00000000 00000000 00000000 295b0010 00000000 00000000 00000000 00000000 md 295c0000 295c0000 00000000 00000000 00000000 00000000 295c0010 00000000 00000000 00000000 00000000 maybe because the display controller is not powered up can we poke the pmu registers and clock and reset registers to power it up let s find out power management registers for star64 jh7110 display controller read the article risc v star64 jh7110 power up the display controller with u boot bootloader https lupyuen github io articles display3 can we poke the power management registers to power up the display controller from jh7110 power management https doc en rvspace org jh7110 trm jh7110 trm overview pm html power management https doc en rvspace org jh7110 trm image rd jh7110 power stratey png display controller vout is powered by the power domains dom dig dom vout how to enable these power domains we refer to the power management unit pmu registers https doc en rvspace org jh7110 trm jh7110 trm register info pmu html from system memory map https doc en rvspace org jh7110 trm jh7110 trm system memory map html pmu is at 0x1703 0000 text md 17030000 17030000 00000000 00000000 000000ff 00000003 17030010 00000000 0000ffff 04008402 04010040 17030020 00010040 00000000 00000000 00000000 17030030 00000000 00000000 00000000 00000000 17030040 00000000 00000000 000007ff 00000012 17030050 0000001f ffffffff 00000001 00000003 17030060 00000000 00000000 00000080 00000000 17030070 00000000 00000000 00000000 00000000 17030080 00000003 00000000 00000203 00000000 17030090 00000020 00000003 000001c3 00000000 170300a0 00000000 00000000 00000000 00000000 170300b0 00000000 00000000 00000000 00000000 170300c0 00000000 00000000 00000000 00000000 170300d0 00000000 00000000 00000000 00000000 170300e0 00000000 00000000 00000000 00000000 170300f0 00000000 00000000 00000000 00000000 which power domains are already enabled the current power mode register https doc en rvspace org jh7110 trm jh7110 trm register info pmu html is at offset address 0x80 address 0x17030080 from u boot log above current power mode is 3 which means bit 0 systop power mode systop power is enabled bit 1 cpu power mode cpu power is enabled but bit 4 vout power mode vout power is disabled how to enable vout power from pmu function description https doc en rvspace org jh7110 trm jh7110 trm function descript pmu html sw encourage turn on sequence 1 configure the register sw turn on power mode offset 0x0c write the bit 1 which power domain will be turn on write the others 0 2 write the sw turn on command sequence write the register software encourage offset 0x44 0xff 0x05 0x50 which is implemented in the linux driver with no delays in the command sequence jh7110 pmu c https github com starfive tech linux blob jh7110 visionfive2 devel drivers soc starfive jh7110 pmu c l132 l147 what s a software encourage something got lost in translation let s assume it means software trigger we do it in u boot like this text md 1703000c 1 mw 1703000c 0x10 1 md 1703000c 1 mw 17030044 0xff 1 mw 17030044 0x05 1 mw 17030044 0x50 1 then we check status if vout power is on text md 17030080 1 md 29400000 0x40 md 29480000 0x40 md 29590000 0x40 md 295b0000 0x40 md 295c0000 0x40 here s the u boot log text starfive md 1703000c 1 1703000c 00000003 starfive mw 1703000c 0x10 1 starfive starfive md 1703000c 1 1703000c 00000010 starfive md 17030080 1 17030080 00000003 starfive mw 17030044 0xff 1 starfive starfive md 17030080 1 17030080 00000003 starfive mw 17030044 0x05 1 starfive starfive md 17030080 1 17030080 00000003 starfive mw 17030044 0x50 1 starfive starfive md 17030080 1 17030080 00000013 is the display controller now powered up from u boot log above the current power mode https doc en rvspace org jh7110 trm jh7110 trm register info pmu html 0x17030080 is 0x13 which means bit 0 systop power mode systop power is enabled bit 1 cpu power mode cpu power is enabled bit 4 vout power mode vout power is enabled but the display controller registers are still missing text starfive md 29400000 0x40 29400000 00000000 00000000 00000000 00000000 29400010 00000000 00000000 00000000 00000000 29400020 00000000 00000000 00000000 00000000 29400030 00000000 00000000 00000000 00000000 29400040 00000000 00000000 00000000 00000000 29400050 00000000 00000000 00000000 00000000 29400060 00000000 00000000 00000000 00000000 29400070 00000000 00000000 00000000 00000000 29400080 00000000 00000000 00000000 00000000 29400090 00000000 00000000 00000000 00000000 294000a0 00000000 00000000 00000000 00000000 294000b0 00000000 00000000 00000000 00000000 294000c0 00000000 00000000 00000000 00000000 294000d0 00000000 00000000 00000000 00000000 294000e0 00000000 00000000 00000000 00000000 294000f0 00000000 00000000 00000000 00000000 starfive md 29480000 0x40 29480000 00000000 00000000 00000000 00000000 29480010 00000000 00000000 00000000 00000000 29480020 00000000 00000000 00000000 00000000 29480030 00000000 00000000 00000000 00000000 29480040 00000000 00000000 00000000 00000000 29480050 00000000 00000000 00000000 00000000 29480060 00000000 00000000 00000000 00000000 29480070 00000000 00000000 00000000 00000000 29480080 00000000 00000000 00000000 00000000 29480090 00000000 00000000 00000000 00000000 294800a0 00000000 00000000 00000000 00000000 294800b0 00000000 00000000 00000000 00000000 294800c0 00000000 00000000 00000000 00000000 294800d0 00000000 00000000 00000000 00000000 294800e0 00000000 00000000 00000000 00000000 294800f0 00000000 00000000 00000000 00000000 starfive md 29590000 0x40 29590000 00000000 00000000 00000000 00000000 29590010 00000000 00000000 00000000 00000000 29590020 00000000 00000000 00000000 00000000 29590030 00000000 00000000 00000000 00000000 29590040 00000000 00000000 00000000 00000000 29590050 00000000 00000000 00000000 00000000 29590060 00000000 00000000 00000000 00000000 29590070 00000000 00000000 00000000 00000000 29590080 00000000 00000000 00000000 00000000 29590090 00000000 00000000 00000000 00000000 295900a0 00000000 00000000 00000000 00000000 295900b0 00000000 00000000 00000000 00000000 295900c0 00000000 00000000 00000000 00000000 295900d0 00000000 00000000 00000000 00000000 295900e0 00000000 00000000 00000000 00000000 295900f0 00000000 00000000 00000000 00000000 starfive md 295b0000 0x40 295b0000 00000000 00000000 00000000 00000000 295b0010 00000000 00000000 00000000 00000000 295b0020 00000000 00000000 00000000 00000000 295b0030 00000000 00000000 00000000 00000000 295b0040 00000000 00000000 00000000 00000000 295b0050 00000000 00000000 00000000 00000000 295b0060 00000000 00000000 00000000 00000000 295b0070 00000000 00000000 00000000 00000000 295b0080 00000000 00000000 00000000 00000000 295b0090 00000000 00000000 00000000 00000000 295b00a0 00000000 00000000 00000000 00000000 295b00b0 00000000 00000000 00000000 00000000 295b00c0 00000000 00000000 00000000 00000000 295b00d0 00000000 00000000 00000000 00000000 295b00e0 00000000 00000000 00000000 00000000 295b00f0 00000000 00000000 00000000 00000000 starfive md 295c0000 0x40 295c0000 00000000 00000000 00000000 00000000 295c0010 00000000 00000000 00000000 00000000 295c0020 00000000 00000000 00000000 00000000 295c0030 00000000 00000000 00000000 00000000 295c0040 00000000 00000000 00000000 00000000 295c0050 00000000 00000000 00000000 00000000 295c0060 00000000 00000000 00000000 00000000 295c0070 00000000 00000000 00000000 00000000 295c0080 00000000 00000000 00000000 00000000 295c0090 00000000 00000000 00000000 00000000 295c00a0 00000000 00000000 00000000 00000000 295c00b0 00000000 00000000 00000000 00000000 295c00c0 00000000 00000000 00000000 00000000 295c00d0 00000000 00000000 00000000 00000000 295c00e0 00000000 00000000 00000000 00000000 295c00f0 00000000 00000000 00000000 00000000 starfive let s poke the clock and reset registers clock and reset registers for star64 jh7110 display controller read the article risc v star64 jh7110 power up the display controller with u boot bootloader https lupyuen github io articles display3 vout power is already enabled via pmu how do we poke the clock and reset registers to power up the display controller based on the jh7110 clock structure https doc en rvspace org jh7110 trm jh7110 trm clock structure html clock structure https doc en rvspace org jh7110 trm image drawing clock structure svg display controller vout crg top left is clocked and reset by clk vout root mipiphy ref clk hdmiphy ref clk clk vout src 1228 8m clk vout axi 614 4m clk vout ahb 204 8m clk ahb1 clk mclk 51 2m rstn vout how to enable the above clocks and deassert the above reset we refer to the system clock and reset sys crg registers https doc en rvspace org jh7110 trm jh7110 trm sys crg html from system memory map https doc en rvspace org jh7110 trm jh7110 trm system memory map html system crg is at 0x1302 0000 text md 13020000 13020000 01000000 00000001 00000002 00000000 13020010 01000002 01000000 00000003 00000003 13020020 00000002 80000000 80000000 00000004 13020030 80000000 00000002 00000002 00000002 13020040 00000002 0000000c 00000000 00000000 13020050 00000002 00000002 80000014 80000010 13020060 8000000c 80000000 80000000 80000000 13020070 80000000 80000000 80000000 00000006 13020080 80000000 80000000 80000000 80000000 13020090 80000000 80000000 80000000 80000000 130200a0 00000002 00000002 00000002 01000000 130200b0 80000000 00000003 00000000 00000000 130200c0 00000000 0000000c 00000000 00000000 130200d0 00000000 80000000 00000003 00000002 130200e0 80000000 80000000 00000000 00000002 130200f0 00000000 00000000 00000000 00000000 todo which clocks and registers are already enabled deasserted based on the system control registers https doc en rvspace org jh7110 trm jh7110 trm sys crg html we need to enable these clocks clock ahb 1 offset 0x28 mclk out offset 0x4c clk u0 sft7110 noc bus clk cpu axi offset 0x98 clk u0 sft7110 noc bus clk axicfg0 axi offset 0x9c clk u0 dom vout top clk dom vout top clk vout src offset 0xe8 clock noc display axi offset 0xf0 clock video output ahb offset 0xf4 clock video output axi offset 0xf8 clock video output hdmi tx0 mclk offset 0xfc ok looks excessive but better to enable more clocks than too few for the clock registers above we should set bit 31 clk icg to 1 1 clock enable 0 clock disable here are the u boot commands to enable the clocks text md 13020028 1 mw 13020028 0x80000000 1 md 13020028 1 md 1302004c 1 mw 1302004c 0x80000000 1 md 1302004c 1 md 13020098 1 mw 13020098 0x80000000 1 md 13020098 1 md 1302009c 1 mw 1302009c 0x80000000 1 md 1302009c 1 md 130200e8 1 mw 130200e8 0x80000000 1 md 130200e8 1 md 130200f0 1 mw 130200f0 0x80000000 1 md 130200f0 1 md 130200f4 1 mw 130200f4 0x80000000 1 md 130200f4 1 md 130200f8 1 mw 130200f8 0x80000000 1 md 130200f8 1 md 130200fc 1 mw 130200fc 0x80000000 1 md 130200fc 1 here s the u boot log text starfive md 13020028 1 13020028 80000000 starfive mw 13020028 0x80000000 1 starfive starfive md 13020028 1 13020028 80000000 starfive md 1302004c 1 1302004c 00000000 starfive mw 1302004c 0x80000000 1 starfive starfive md 1302004c 1 1302004c 80000000 starfive md 13020098 1 13020098 80000000 starfive mw 13020098 0x80000000 1 starfive starfive md 13020098 1 13020098 80000000 starfive md 1302009c 1 1302009c 80000000 starfive mw 1302009c 0x80000000 1 starfive starfive md 1302009c 1 1302009c 80000000 starfive md 130200e8 1 130200e8 00000000 starfive mw 130200e8 0x80000000 1 starfive starfive md 130200e8 1 130200e8 80000000 starfive md 130200f0 1 130200f0 00000000 starfive mw 130200f0 0x80000000 1 starfive starfive md 130200f0 1 130200f0 80000000 starfive md 130200f4 1 130200f4 00000000 starfive mw 130200f4 0x80000000 1 starfive starfive md 130200f4 1 130200f4 80000000 starfive md 130200f8 1 130200f8 00000000 starfive mw 130200f8 0x80000000 1 starfive starfive md 130200f8 1 130200f8 80000000 starfive md 130200fc 1 130200fc 00000000 starfive mw 130200fc 0x80000000 1 starfive starfive md 130200fc 1 130200fc 80000000 starfive what about the resets based on the system control registers https doc en rvspace org jh7110 trm jh7110 trm sys crg html we need to deassert these resets software reset 1 address selector offset 0x2fc bit 11 rstn u0 dom vout top rstn dom vout top rstn vout src 1 assert reset 0 de assert reset syscrg reset status 0 offset 0x308 bit 26 rstn u0 sft7110 noc bus reset disp axi n 1 assert reset 0 de assert reset syscrg reset status 1 offset 0x30c bit 11 rstn u0 dom vout top rstn dom vout top rstn vout src 1 assert reset 0 de assert reset these are the u boot commands to deassert the above resets text md 130202fc 1 mw 130202fc 0x7e7f600 1 md 130202fc 1 md 13020308 1 mw 13020308 0xfb9fffff 1 md 13020308 1 md 1302030c 1 the last one is already deasserted no need to change it then we check the display registers text md 29400000 0x20 md 29480000 0x20 md 29590000 0x20 md 295b0000 0x20 md 295c0000 0x20 here s the u boot log text starfive md 1703000c 1 1703000c 00000003 starfive mw 1703000c 0x10 1 starfive starfive md 1703000c 1 1703000c 00000010 starfive mw 17030044 0xff 1 starfive starfive mw 17030044 0x05 1 starfive starfive mw 17030044 0x50 1 starfive starfive md 17030080 1 17030080 00000013 starfive mw 13020028 0x80000000 1 starfive starfive mw 1302004c 0x80000000 1 starfive starfive mw 13020098 0x80000000 1 starfive starfive mw 1302009c 0x80000000 1 starfive starfive mw 130200e8 0x80000000 1 starfive starfive mw 130200f0 0x80000000 1 starfive starfive mw 130200f4 0x80000000 1 starfive starfive mw 130200f8 0x80000000 1 starfive starfive mw 130200fc 0x80000000 1 starfive starfive mw 130202fc 0x7e7f600 1 starfive starfive mw 13020308 0xfb9fffff 1 starfive starfive md 295b0000 0x40 295b0000 00000000 000b0000 00000000 00000000 295b0010 00000000 00000000 00000000 00000000 295b0020 00000000 00000000 00000000 00000000 295b0030 00000000 00000000 00000000 00000000 295b0040 00000000 00000000 00000000 00000000 295b0050 00000000 00000000 00000000 00000000 295b0060 00000000 00000000 00000000 00000000 295b0070 00000000 00000000 00000000 00000000 295b0080 00000000 00000000 00000000 00000000 295b0090 00000000 00000000 00000000 00000000 295b00a0 00000000 00000000 00000000 00000000 295b00b0 00000000 00000000 00000000 00000000 295b00c0 00000000 00000000 00000000 00000000 295b00d0 00000000 00000000 00000000 00000000 295b00e0 00000000 00000000 00000000 00000000 295b00f0 00000000 00000000 00000000 00000000 starfive md 295c0000 0x40 295c0000 00000004 00000004 00000004 0000000c 295c0010 00000000 00000000 00000000 00000000 295c0020 00000000 00000000 00000000 00000000 295c0030 00000000 00000000 00000000 00000000 295c0040 00000000 00000000 00000fff 00000000 295c0050 00000000 00000000 00000000 00000000 295c0060 00000000 00000000 00000000 00000000 295c0070 00000000 00000000 00000000 00000000 295c0080 00000000 00000000 00000000 00000000 295c0090 00000000 00000000 00000000 00000000 295c00a0 00000000 00000000 00000000 00000000 295c00b0 00000000 00000000 00000000 00000000 295c00c0 00000000 00000000 00000000 00000000 295c00d0 00000000 00000000 00000000 00000000 295c00e0 00000000 00000000 00000000 00000000 295c00f0 00000000 00000000 00000000 00000000 starfive the display controller registers are now visible at vout crg 0x295c 0000 yay which means display controller is alive yay star64 jh7110 display controller is alive https lupyuen github io images display3 title png the default values seem to match dom vout crg https doc en rvspace org jh7110 trm jh7110 trm dom vout crg html clk tx esc should have default 24 hc there is a typo in the doc 24 h12 clk tx esc should have default 24 hc there is a typo in the doc 24 h12 https lupyuen github io images display3 typo png fyi it hangs when we read u0 hdmitx at 0x2959 0000 probably because display controller is actually powered up text starfive mw 13020028 0x80000000 1 starfive starfive mw 1302004c 0x80000000 1 starfive starfive mw 13020098 0x80000000 1 starfive starfive mw 1302009c 0x80000000 1 starfive starfive mw 130200e8 0x80000000 1 starfive starfive mw 130200f0 0x80000000 1 starfive starfive mw 130200f4 0x80000000 1 starfive starfive mw 130200f8 0x80000000 1 starfive starfive mw 130200fc 0x80000000 1 starfive starfive mw 130202fc 0x7e7f600 1 starfive starfive mw 13020308 0xfb9fffff 1 starfive starfive md 29400000 0x40 29400000 00000000 00000000 00000000 00000000 29400010 00000000 00000000 00000000 00000000 29400020 00000000 00000000 00000000 00000000 29400030 00000000 00000000 00000000 00000000 29400040 00000000 00000000 00000000 00000000 29400050 00000000 00000000 00000000 00000000 29400060 00000000 00000000 00000000 00000000 29400070 00000000 00000000 00000000 00000000 29400080 00000000 00000000 00000000 00000000 29400090 00000000 00000000 00000000 00000000 294000a0 00000000 00000000 00000000 00000000 294000b0 00000000 00000000 00000000 00000000 294000c0 00000000 00000000 00000000 00000000 294000d0 00000000 00000000 00000000 00000000 294000e0 00000000 00000000 00000000 00000000 294000f0 00000000 00000000 00000000 00000000 starfive md 29480000 0x40 29480000 00000000 00000000 00000000 00000000 29480010 00000000 00000000 00000000 00000000 29480020 00000000 00000000 00000000 00000000 29480030 00000000 00000000 00000000 00000000 29480040 00000000 00000000 00000000 00000000 29480050 00000000 00000000 00000000 00000000 29480060 00000000 00000000 00000000 00000000 29480070 00000000 00000000 00000000 00000000 29480080 00000000 00000000 00000000 00000000 29480090 00000000 00000000 00000000 00000000 294800a0 00000000 00000000 00000000 00000000 294800b0 00000000 00000000 00000000 00000000 294800c0 00000000 00000000 00000000 00000000 294800d0 00000000 00000000 00000000 00000000 294800e0 00000000 00000000 00000000 00000000 294800f0 00000000 00000000 00000000 00000000 starfive md 29590000 0x40 automate u boot to power up display controller read the article risc v star64 jh7110 power up the display controller with u boot bootloader https lupyuen github io articles display3 that s a long list of u boot commands can we automate this text mw 1703000c 0x10 1 mw 17030044 0xff 1 mw 17030044 0x05 1 mw 17030044 0x50 1 mw 13020028 0x80000000 1 mw 1302004c 0x80000000 1 mw 13020098 0x80000000 1 mw 1302009c 0x80000000 1 mw 130200e8 0x80000000 1 mw 130200f0 0x80000000 1 mw 130200f4 0x80000000 1 mw 130200f8 0x80000000 1 mw 130200fc 0x80000000 1 mw 130202fc 0x7e7f600 1 mw 13020308 0xfb9fffff 1 md 295c0000 0x20 sure can run this in u boot text create the command to power up the video output setenv video on mw 1703000c 0x10 1 mw 17030044 0xff 1 mw 17030044 0x05 1 mw 17030044 0x50 1 mw 13020028 0x80000000 1 mw 1302004c 0x80000000 1 mw 13020098 0x80000000 1 mw 1302009c 0x80000000 1 mw 130200e8 0x80000000 1 mw 130200f0 0x80000000 1 mw 130200f4 0x80000000 1 mw 130200f8 0x80000000 1 mw 130200fc 0x80000000 1 mw 130202fc 0x7e7f600 1 mw 13020308 0xfb9fffff 1 md 295c0000 0x20 check that it s correct printenv video on save it for future reboots saveenv run the command to power up the video output run video on the run feels a bit like basic we should see text starfive run video on 295c0000 00000004 00000004 00000004 0000000c 295c0010 00000000 00000000 00000000 00000000 295c0020 00000000 00000000 00000000 00000000 295c0030 00000000 00000000 00000000 00000000 295c0040 00000000 00000000 00000fff 00000000 295c0050 00000000 00000000 00000000 00000000 295c0060 00000000 00000000 00000000 00000000 295c0070 00000000 00000000 00000000 00000000 so much easier maybe we could use this to render something to the hdmi display before converting to c for nuttx how will we test this in nuttx probably inside board late initialize like this jh7110 appinit c https github com lupyuen2 wip pinephone nuttx blob hdmi boards risc v jh7110 star64 src jh7110 appinit c l154 l215 c void board late initialize void mount the ram disk mount ramdisk perform board specific initialization ifdef config nsh archinit mount null proc procfs 0 null endif verfy that display controller is down uint32 t val getreg32 0x295c0000 debugassert val 0 power up the display controller todo switch to constants putreg32 0x10 0x1703000c putreg32 0xff 0x17030044 putreg32 0x05 0x17030044 putreg32 0x50 0x17030044 putreg32 0x80000000 0x13020028 putreg32 0x80000000 0x1302004c putreg32 0x80000000 0x13020098 putreg32 0x80000000 0x1302009c putreg32 0x80000000 0x130200e8 putreg32 0x80000000 0x130200f0 putreg32 0x80000000 0x130200f4 putreg32 0x80000000 0x130200f8 putreg32 0x80000000 0x130200fc software reset 1 address selector offset 0x2fc clear bit 11 rstn u0 dom vout top rstn dom vout top rstn vout src modifyreg32 0x130202fc 1 11 0 addr clear bits set bits syscrg reset status 0 offset 0x308 clear bit 26 rstn u0 sft7110 noc bus reset disp axi n modifyreg32 0x13020308 1 26 0 addr clear bits set bits verfy that display controller is up val getreg32 0x295c0000 debugassert val 4 test hdmi int test hdmi void int ret test hdmi debugassert ret 0 display subsystem base address https doc en rvspace org jh7110 trm jh7110 trm memory map display html define display base address 0x29400000 dom vout control registers https doc en rvspace org jh7110 trm jh7110 trm memory map display html define crg base address display base address 0x1c0000 enable clock https doc en rvspace org jh7110 trm jh7110 trm dom vout crg html define clk icg 1 31 https doc en rvspace org jh7110 trm jh7110 trm dom vout crg html define clk u0 dc8200 clk pix0 crg base address 0x1c test hdmi int test hdmi void read the star64 jh7110 display controller registers with u boot bootloader read the article risc v star64 jh7110 power up the display controller with u boot bootloader https lupyuen github io articles display3 from jh7110 appinit c https github com lupyuen2 wip pinephone nuttx blob hdmi boards risc v jh7110 star64 src jh7110 appinit c l154 l215 c display subsystem base address https doc en rvspace org jh7110 trm jh7110 trm memory map display html define display base address 0x29400000 dom vout control registers https doc en rvspace org jh7110 trm jh7110 trm memory map display html define crg base address display base address 0x1c0000 dom vout control registers https doc en rvspace org jh7110 trm jh7110 trm dom vout crg html define clk u0 dc8200 clk axi crg base address 0x10 define clk u0 dc8200 clk core crg base address 0x14 define clk u0 dc8200 clk ahb crg base address 0x18 define clk u0 dc8200 clk pix0 crg base address 0x1c define clk u0 dc8200 clk pix1 crg base address 0x20 define clk u0 hdmi tx clk mclk crg base address 0x3c define clk u0 hdmi tx clk bclk crg base address 0x40 define clk u0 hdmi tx clk sys crg base address 0x44 define clk icg 1 31 define software reset assert0 addr assert sel crg base address 0x38 define rstn u0 dc8200 rstn axi 1 0 define rstn u0 dc8200 rstn ahb 1 1 define rstn u0 dc8200 rstn core 1 2 define rstn u0 hdmi tx rstn hdmi 1 9 u boot commands text run video on mw 295c0010 0x80000000 1 mw 295c0014 0x80000000 1 mw 295c0018 0x80000000 1 mw 295c001c 0x80000000 1 mw 295c0020 0x80000000 1 mw 295c003c 0x80000000 1 mw 295c0040 0x80000000 1 mw 295c0044 0x80000000 1 md 295c0038 1 mw 295c0038 0 1 md 295c0038 1 md 295c004c 1 mw 295c004c 0 1 md 295c004c 1 todo why is reset at 295c0048 md 295c0048 1 mw 295c0048 0 1 md 295c0048 1 md 29400000 0x20 md 29480000 0x20 md 295c0000 0x20 u boot log text starfive run video on 295c0000 00000004 00000004 00000004 0000000c 295c0010 00000000 00000000 00000000 00000000 295c0020 00000000 00000000 00000000 00000000 295c0030 00000000 00000000 00000000 00000000 295c0040 00000000 00000000 00000fff 00000000 295c0050 00000000 00000000 00000000 00000000 295c0060 00000000 00000000 00000000 00000000 295c0070 00000000 00000000 00000000 00000000 starfive mw 295c0010 0x80000000 1 starfive starfive mw 295c0014 0x80000000 1 starfive starfive mw 295c0018 0x80000000 1 starfive starfive mw 295c001c 0x80000000 1 starfive starfive mw 295c0020 0x80000000 1 starfive starfive mw 295c003c 0x80000000 1 starfive starfive mw 295c0040 0x80000000 1 starfive starfive mw 295c0044 0x80000000 1 starfive starfive md 29400000 0x20 29400000 00000000 00000000 00000000 00000000 29400010 00000000 00000000 00000000 00000000 29400020 00000000 00000000 00000000 00000000 29400030 00000000 00000000 00000000 00000000 29400040 00000000 00000000 00000000 00000000 29400050 00000000 00000000 00000000 00000000 29400060 00000000 00000000 00000000 00000000 29400070 00000000 00000000 00000000 00000000 starfive mw 295c0038 0 1 starfive starfive md 29400000 0x20 29400000 00000000 00000000 00000000 00000000 29400010 00000000 00000000 00000000 00000000 29400020 00000000 00000000 00000000 00000000 29400030 00000000 00000000 00000000 00000000 29400040 00000000 00000000 00000000 00000000 29400050 00000000 00000000 00000000 00000000 29400060 00000000 00000000 00000000 00000000 29400070 00000000 00000000 00000000 00000000 starfive mw 295c004c 0 1 starfive starfive md 29400000 0x20 29400000 00000000 00000000 00000000 00000000 29400010 00000000 00000000 00000000 00000000 29400020 00000000 00000000 00000000 00000000 29400030 00000000 00000000 00000000 00000000 29400040 00000000 00000000 00000000 00000000 29400050 00000000 00000000 00000000 00000000 29400060 00000000 00000000 00000000 00000000 29400070 00000000 00000000 00000000 00000000 starfive mw 295c0048 0 1 starfive starfive md 29400000 0x20 29400000 00000900 80010000 00222200 00000000 29400010 00000000 00000004 14010000 000b4b41 ak 29400020 00008200 00005720 20210316 16015600 w v 29400030 0000030e a0600084 00000000 00000000 29400040 00000000 00000000 00000000 00000000 29400050 00000000 00000000 00000000 00000000 29400060 00000000 00000000 00000000 00000000 29400070 00000000 08050000 00000002 00000000 starfive md 29480000 0x20 29480000 00000000 00000000 00000000 00000000 29480010 00000000 00000000 00000000 00000000 29480020 00000000 00000000 00000000 00000000 29480030 00000000 00000000 00000000 00000000 29480040 00000000 00000000 00000000 00000000 29480050 00000000 00000000 00000000 00000000 29480060 00000000 00000000 00000000 00000000 29480070 00000000 00000000 00000000 00000000 starfive md 295c0000 0x20 295c0000 00000004 00000004 00000004 0000000c 295c0010 80000000 80000000 80000000 80000000 295c0020 80000000 00000000 00000000 00000000 295c0030 00000000 00000000 00000000 80000000 295c0040 80000000 80000000 00000000 00000777 w 295c0050 00000000 00000000 00000000 00000000 295c0060 00000000 00000000 00000000 00000000 295c0070 00000000 00000000 00000000 00000000 starfive todo why is reset at 295c0048 todo did we overwrite any default values for clock mux and multiplier revision and chip id https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1301 l1361 are at c define dc hw revision 0x0024 define dc hw chip cid 0x0030 u boot commands text dump the hardware revision md 29400024 1 dump the chip id md 29400030 1 we see text starfive md 29400024 1 29400024 00005720 w starfive md 29400030 1 29400030 0000030e starfive based on vs dc hw c https github com starfive tech linux blob jh7110 visionfive2 devel drivers gpu drm verisilicon vs dc hw c l1301 l1361 revision 0x5720 which means hw rev dc rev 0 chip id 0x30e which looks correct yay fyi 295c004c shows 0x777 but can t be cleared why is it showing the current reset status text starfive md 295c0038 1 295c0038 00000000 starfive md 295c004c 1 295c004c 00000777 w starfive md 295c0048 1 295c0048 00000000 starfive mw 295c004c 0 1 starfive starfive md 295c004c 1 295c004c 00000777 w starfive md 29400000 0x20 29400000 00000900 80010000 00222200 00000000 29400010 00000000 00000004 14010000 000b4b41 ak 29400020 00008200 00005720 20210316 16015600 w v 29400030 0000030e a0600084 00000000 00000000 29400040 00000000 00000000 00000000 00000000 29400050 00000000 00000000 00000000 00000000 29400060 00000000 00000000 00000000 00000000 29400070 00000000 08050000 00000002 00000000 starfive md 29480000 0x20 29480000 00000000 00000000 00000000 00000000 29480010 00000000 00000000 00000000 00000000 29480020 00000000 00000000 00000000 00000000 29480030 00000000 00000000 00000000 00000000 29480040 00000000 00000000 00000000 00000000 29480050 00000000 00000000 00000000 00000000 29480060 00000000 00000000 00000000 00000000 29480070 00000000 00000000 00000000 00000000 starfive md 295c0000 0x20 295c0000 00000004 00000004 00000004 0000000c 295c0010 80000000 80000000 80000000 80000000 295c0020 80000000 00000000 00000000 00000000 295c0030 00000000 00000000 00000000 80000000 295c0040 80000000 80000000 00000000 00000777 w 295c0050 00000000 00000000 00000000 00000000 295c0060 00000000 00000000 00000000 00000000 295c0070 00000000 00000000 00000000 00000000 starfive u boot script text create the command to power up the display controller setenv display on mw 295c0010 0x80000000 1 mw 295c0014 0x80000000 1 mw 295c0018 0x80000000 1 mw 295c001c 0x80000000 1 mw 295c0020 0x80000000 1 mw 295c003c 0x80000000 1 mw 295c0040 0x80000000 1 mw 295c0044 0x80000000 1 mw 295c0048 0 1 md 29400000 0x20 check that it s correct printenv display on save it for future reboots saveenv run the command to power up the video output run video on run the command to power up the display controller run display on we should see text starfive run video on 295c0000 00000004 00000004 00000004 0000000c 295c0010 00000000 00000000 00000000 00000000 295c0020 00000000 00000000 00000000 00000000 295c0030 00000000 00000000 00000000 00000000 295c0040 00000000 00000000 00000fff 00000000 295c0050 00000000 00000000 00000000 00000000 295c0060 00000000 00000000 00000000 00000000 295c0070 00000000 00000000 00000000 00000000 starfive run display on 29400000 00000900 80010000 00222200 00000000 29400010 00000000 00000004 14010000 000b4b41 ak 29400020 00008200 00005720 20210316 16015600 w v 29400030 0000030e a0600084 00000000 00000000 29400040 00000000 00000000 00000000 00000000 29400050 00000000 00000000 00000000 00000000 29400060 00000000 00000000 00000000 00000000 29400070 00000000 08050000 00000002 00000000 todo nuttx log text flattened device tree blob at 46000000 booting using the fdt blob at 0x46000000 using device tree in place at 0000000046000000 end 000000004600f43a starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled bcboard late initialize revision 0x5720 chip id 0x30e nuttshell nsh nuttx 12 0 3 nsh jh7110 system configuration registers todo sys syscon system configuration registers https doc en rvspace org jh7110 trm jh7110 trm sys syscon html from system memory map https doc en rvspace org jh7110 trm jh7110 trm system memory map html system syscon is at 0x1303 0000 text md 13030000 13030000 00000000 00000000 00000000 00000000 13030010 00000000 00d54d54 034fea80 0000007d tm o 13030020 45555555 042ba603 45e00000 00c7a60c uuue e 13030030 45333333 00000002 00000000 00000000 333e 13030040 00000000 00000000 00000000 00000000 13030050 00000000 00000000 00000000 00000000 13030060 00000002 00000000 2a000000 00000000 13030070 2a000000 00000000 2a000000 00000000 13030080 2a000000 01aa8000 00000d54 6aa00000 t j 13030090 00000004 00000000 00000000 00042600 130300a0 00000000 00000000 00000000 00000000 130300b0 00000000 00000000 00000000 00000000 130300c0 00000000 00000000 00000000 00000000 130300d0 00000000 00000000 00000000 00000000 130300e0 00000000 00000000 00000000 00000000 130300f0 00000000 00000000 00000000 00000000 todo which syscon registers are already configured jh7110 bus connection todo from bus connection https doc en rvspace org jh7110 trm jh7110 trm bus connection html bus connection https doc en rvspace org jh7110 trm image rd jh7110 stg mtrx connection17 png todo do we need to bother with bus connections power up the i2c controller for star64 jh7110 let s explore the i2c controller for star64 jh7110 we need the i2c for controlling the x powers axp15060 pmic https lupyuen github io articles display3 appendix jh7110 display driver which will be used for hdmi output according to the i2c device tree configuration https doc en rvspace org visionfive2 dg i2c jh7110 sdk i2c source code html i2c port 0 base address is 0x10030000 with range 0x10000 there are 7 i2c ports i2c0 to i2c6 from jh7110 system memory map https doc en rvspace org jh7110 trm jh7110 trm system memory map html start address end address size attribute device description 0x00 1003 0000 0x00 1003 ffff 64kb rw a i2c0 0x00 1004 0000 0x00 1004 ffff 64kb rw a i2c1 0x00 1005 0000 0x00 1005 ffff 64kb rw a i2c2 0x00 1203 0000 0x00 1203 ffff 64kb rw a i2c3 0x00 1204 0000 0x00 1204 ffff 64kb rw a i2c4 0x00 1205 0000 0x00 1205 ffff 64kb rw a i2c5 0x00 1206 0000 0x00 1206 ffff 64kb rw a i2c6 let s dump the i2c registers with u boot bootloader bash md 0x10030000 10030000 00000000 00000000 00000000 00000000 10030010 00000000 00000000 00000000 00000000 10030020 00000000 00000000 00000000 00000000 10030030 00000000 00000000 00000000 00000000 10030040 00000000 00000000 00000000 00000000 10030050 00000000 00000000 00000000 00000000 10030060 00000000 00000000 00000000 00000000 10030070 00000000 00000000 00000000 00000000 10030080 00000000 00000000 00000000 00000000 10030090 00000000 00000000 00000000 00000000 100300a0 00000000 00000000 00000000 00000000 100300b0 00000000 00000000 00000000 00000000 100300c0 00000000 00000000 00000000 00000000 100300d0 00000000 00000000 00000000 00000000 100300e0 00000000 00000000 00000000 00000000 100300f0 00000000 00000000 00000000 00000000 the i2c registers are empty that s because we haven t powered up the i2c controller according to the i2c device tree configuration https doc en rvspace org visionfive2 dg i2c jh7110 sdk i2c source code html the i2c clocks and i2c resets are text clocks clkgen jh7110 i2c0 clk core clkgen jh7110 i2c0 clk apb clock names ref pclk resets rstgen rstn u0 dw i2c apb interrupts 35 how to enable clocks jh7110 i2c0 clk core jh7110 i2c0 clk apb and deassert reset rstn u0 dw i2c apb from jh7110 clock structure https doc en rvspace org jh7110 trm jh7110 trm clock structure html we see that i2c is clocked by clk apb0 and clk apb12 there are 7 i2c ports named u0 to u6 as we ll soon see from jh7110 system crg clocks and resets https doc en rvspace org jh7110 trm jh7110 trm sys crg html here are the i2c clocks and resets system crg base address 0x00 1302 0000 u0 clock i2c apb offset 0x228 bit 31 clk icg default 0 1 clock enable 0 clock disable u1 clock i2c apb offset 0x22c bit 31 clk icg default 0 1 clock enable 0 clock disable u2 clock i2c apb offset 0x230 bit 31 clk icg default 0 1 clock enable 0 clock disable u3 clock i2c apb offset 0x234 bit 31 clk icg default 0 1 clock enable 0 clock disable u4 clock i2c apb offset 0x238 bit 31 clk icg default 0 1 clock enable 0 clock disable u5 clock i2c apb offset 0x23c bit 31 clk icg default 0 1 clock enable 0 clock disable u6 clock i2c apb offset 0x240 bit 31 clk icg default 0 1 clock enable 0 clock disable software reset 2 address selector offset 0x300 bit 12 rstn u0 i2c rstn apb default 0 1 assert reset 0 de assert reset bit 13 rstn u1 i2c rstn apb default 1 1 assert reset 0 de assert reset bit 14 rstn u2 i2c rstn apb default 1 1 assert reset 0 de assert reset bit 15 rstn u3 i2c rstn apb default 1 1 assert reset 0 de assert reset bit 16 rstn u4 i2c rstn apb default 1 1 assert reset 0 de assert reset bit 17 rstn u5 i2c rstn apb default 1 1 assert reset 0 de assert reset bit 18 rstn u6 i2c rstn apb default 1 1 assert reset 0 de assert reset what are u0 to u6 they represent the 7 i2c ports in jh7110 in u boot we inspect the system syscrg registers for i2c bash md 0x13020228 7 13020228 00000000 00000000 00000000 00000000 13020238 00000000 80000000 00000000 md 0x13020300 1 13020300 ffe5efcc which says that all i2c clocks are disabled except u5 all i2c resets are asserted except u0 and u5 todo why is i2c port 5 enabled is it used by u boot let s enable all the i2c clocks and deassert all the i2c resets bash enable the i2c clocks mw 0x13020228 0x80000000 7 md 0x13020228 7 13020228 80000000 80000000 80000000 80000000 13020238 80000000 80000000 80000000 deassert the i2c resets mw 0x13020300 0xffe00fcc 1 md 0x13020300 1 13020300 ffe00fcc check the system syscon for i2c md 0x13030014 1 13030014 00d54d54 tm md 0x1303009c 1 1303009c 00042600 dump the i2c registers for i2c port 0 md 0x10030000 0x40 10030000 0000007f 00000055 00000055 00000001 u u 10030010 00000000 00000190 000001d6 0000003c 10030020 00000082 00000006 00000010 00000000 10030030 000008ff 00000000 00000000 00000000 10030040 00000000 00000000 00000000 00000000 10030050 00000000 00000000 00000000 00000000 10030060 00000000 00000000 00000000 00000004 10030070 00000006 00000000 00000000 00000001 10030080 00000000 00000000 00000000 00000000 10030090 00000000 00000064 00000001 00000000 d 100300a0 00000005 00000001 00000000 00000000 100300b0 00000000 00000000 00000000 00000000 100300c0 00000000 00000000 00000000 00000000 100300d0 00000000 00000000 00000000 00000000 100300e0 00000000 00000000 00000000 00000000 100300f0 00000000 001f1fee 3230302a 44570140 002 wd yep i2c port 0 is alive yay todo what about sys syscon https doc en rvspace org jh7110 trm jh7110 trm sys syscon html base address of system syscon 0x00 1303 0000 sys sysconsaif syscfg 20 offset 0x14 default 0xd54d54 bit 25 u0 i2c ic en i2c interface enable read only default 0x0 sys sysconsaif syscfg 156 offset 0x9c default 0x400 bit 00 u1 i2c ic en i2c interface enable read only default 0 bit 15 u2 i2c ic en i2c interface enable read only default 0 bit 16 u3 i2c ic en i2c interface enable read only default 0 bit 17 u4 i2c ic en i2c interface enable read only default 0 bit 18 u5 i2c ic en i2c interface enable read only default 0 bit 19 u6 i2c ic en i2c interface enable read only default 0 in u boot we inspect the system syscon registers for i2c bash md 0x13030014 1 13030014 00d54d54 tm md 0x1303009c 1 1303009c 00042600 which says that i2c port u5 is enabled other i2c ports u0 to u6 are disabled todo let s check again after enabling i2c fyi i2c port u0 is connected to these devices according to the jh7110 device tree https doc en rvspace org visionfive2 dg i2c jh7110 sdk i2c source code html text i2c0 clock frequency 100000 i2c sda hold time ns 300 i2c sda falling time ns 510 i2c scl falling time ns 510 auto calc scl lhcnt pinctrl names default pinctrl 0 i2c0 pins status disabled ac108 a ac108 3b i2c client 1 compatible x power ac108 0 reg 0x3b sound dai cells 0 data protocol 0 wm8960 codec 1a i2c client 2 compatible wlf wm8960 reg 0x1a sound dai cells 0 wlf shared lrclk x powers ac108 is the adc for i2s digital audio nxp wm8960 is the stereo codec for digital audio todo what are these messages from u boot text clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled source https gist github com lupyuen 1e009a3343da70257d6f24400339053f file nuttx scheme star64 log l160 l165 explore the i2c controller for star64 jh7110 todo not linked in any section appears when we search for i2c i2c register description https doc en rvspace org jh7110 trm jh7110 trm register descript i2c html looks garbled jh7110 i2c is based on designware i2c https github com torvalds linux blob master drivers i2c busses i2c designware core h from designware dw apb i2c databook https github com lupyuen nuttx star64 blob main designware apb i2c pdf page 252 figure 8 2 flowchart for dw apb i2c master text write 0 to ic enable to disable dw apb i2c program ic con register fields as required 1 set ic slave disable to 1 slave disabled 2 set ic restart en to 1 enable restart mode 3 set ic 10bitaddr master to 0 7 bit addressing 4 set ic 10bitaddr slave to 0 7 bit addressing 5 set ic max speed mode to 1 standard mode 6 set ic master mode to 1 master enabled set address of target slave by writing it to tar write to ic ss hcnt to set high period of scl write to ic ss lcnt to set low period of scl write to ic intr mask to enable all interrupts write to ic rx tl to set rx fifo threshold level write to ic tx tl to set tx fifo threshold level write 1 to ic enable to enable dw apb i2c write to ic data cmd to push write command and write data or read command tx fifo command is write n rx full interrupt asserted y read ic data cmd 7 0 to retrieve received byte y tx empty interrupt asserted y more commands to send y write to ic data cmd n is ic status 5 mst activity 0 y write 0 to ic enable to disable dw apb i2c which is implemented by this nuttx driver arch arm src cxd56xx cxd56 i2c c https github com apache nuttx blob master arch arm src cxd56xx cxd56 i2c c arch arm src cxd56xx hardware cxd56 i2c h https github com apache nuttx blob master arch arm src cxd56xx hardware cxd56 i2c h bit bang version cxd56 i2c bitbang c https github com apache nuttx blob master arch arm src cxd56xx cxd56 i2c bitbang c and cxd56 i2c bitbang h https github com apache nuttx blob master arch arm src cxd56xx cxd56 i2c bitbang h todo test this with u boot todo read i2c controller with u boot from designware dw apb i2c databook https github com lupyuen nuttx star64 blob main designware apb i2c pdf page 154 ic con offset 0x00 i2c control actual value 0x7f ic tar offset 0x04 i2c target address default value 0x55 actual value 0x55 ic sar offset 0x08 i2c slave address default value 0x55 actual value 0x55 ic enable offset 0x6c i2c enable actual value 0 ic status offset 0x70 i2c status register actual value 6 ic comp param 1 offset 0xf4 component parameter register actual value 0x1f1fee ic comp version offset 0xf8 component version id reset value see the releases table in the amba 2 release notes actual value 0x3230302a ic comp type offset 0xfc designware component type register reset value 0x44570140 actual value yep correct ic device id offset 0xb8 i2c device id reset value ic device id value actual value 0 the above actual values were retrieved from u boot bash omitted power up the i2c controller dump the i2c registers for i2c port 0 md 0x10030000 0x40 10030000 0000007f 00000055 00000055 00000001 u u 10030010 00000000 00000190 000001d6 0000003c 10030020 00000082 00000006 00000010 00000000 10030030 000008ff 00000000 00000000 00000000 10030040 00000000 00000000 00000000 00000000 10030050 00000000 00000000 00000000 00000000 10030060 00000000 00000000 00000000 00000004 10030070 00000006 00000000 00000000 00000001 10030080 00000000 00000000 00000000 00000000 10030090 00000000 00000064 00000001 00000000 d 100300a0 00000005 00000001 00000000 00000000 100300b0 00000000 00000000 00000000 00000000 100300c0 00000000 00000000 00000000 00000000 100300d0 00000000 00000000 00000000 00000000 100300e0 00000000 00000000 00000000 00000000 100300f0 00000000 001f1fee 3230302a 44570140 002 wd todo read pmic with u boot todo which i2c ports are in use bash omitted power up the i2c controller dump the i2c registers for i2c port 1 md 0x10040000 0x40 10040000 0000007f 00000055 00000055 00000001 u u 10040010 00000000 00000190 000001d6 0000003c 10040020 00000082 00000006 00000010 00000000 10040030 000008ff 00000000 00000000 00000000 10040040 00000000 00000000 00000000 00000000 10040050 00000000 00000000 00000000 00000000 10040060 00000000 00000000 00000000 00000004 10040070 00000006 00000000 00000000 00000001 10040080 00000000 00000000 00000000 00000000 10040090 00000000 00000064 00000001 00000000 d 100400a0 00000005 00000001 00000000 00000000 100400b0 00000000 00000000 00000000 00000000 100400c0 00000000 00000000 00000000 00000000 100400d0 00000000 00000000 00000000 00000000 100400e0 00000000 00000000 00000000 00000000 100400f0 00000000 001f1fee 3230302a 44570140 002 wd dump the i2c registers for i2c port 2 md 0x10050000 0x40 10050000 0000007f 00000055 00000055 00000001 u u 10050010 00000000 00000190 000001d6 0000003c 10050020 00000082 00000006 00000010 00000000 10050030 000008ff 00000000 00000000 00000000 10050040 00000000 00000000 00000000 00000000 10050050 00000000 00000000 00000000 00000000 10050060 00000000 00000000 00000000 00000004 10050070 00000006 00000000 00000000 00000001 10050080 00000000 00000000 00000000 00000000 10050090 00000000 00000064 00000001 00000000 d 100500a0 00000005 00000001 00000000 00000000 100500b0 00000000 00000000 00000000 00000000 100500c0 00000000 00000000 00000000 00000000 100500d0 00000000 00000000 00000000 00000000 100500e0 00000000 00000000 00000000 00000000 100500f0 00000000 001f1fee 3230302a 44570140 002 wd dump the i2c registers for i2c port 3 md 0x12030000 0x40 12030000 0000007f 00000055 00000055 00000001 u u 12030010 00000000 00000190 000001d6 0000003c 12030020 00000082 00000006 00000010 00000000 12030030 000008ff 00000000 00000000 00000000 12030040 00000000 00000000 00000000 00000000 12030050 00000000 00000000 00000000 00000000 12030060 00000000 00000000 00000000 00000004 12030070 00000006 00000000 00000000 00000001 12030080 00000000 00000000 00000000 00000000 12030090 00000000 00000064 00000001 00000000 d 120300a0 00000005 00000001 00000000 00000000 120300b0 00000000 00000000 00000000 00000000 120300c0 00000000 00000000 00000000 00000000 120300d0 00000000 00000000 00000000 00000000 120300e0 00000000 00000000 00000000 00000000 120300f0 00000000 001f1fee 3230302a 44570140 002 wd dump the i2c registers for i2c port 4 md 0x12040000 0x40 12040000 0000007f 00000055 00000055 00000001 u u 12040010 00000000 00000190 000001d6 0000003c 12040020 00000082 00000006 00000010 00000000 12040030 000008ff 00000000 00000000 00000000 12040040 00000000 00000000 00000000 00000000 12040050 00000000 00000000 00000000 00000000 12040060 00000000 00000000 00000000 00000004 12040070 00000006 00000000 00000000 00000001 12040080 00000000 00000000 00000000 00000000 12040090 00000000 00000064 00000001 00000000 d 120400a0 00000005 00000001 00000000 00000000 120400b0 00000000 00000000 00000000 00000000 120400c0 00000000 00000000 00000000 00000000 120400d0 00000000 00000000 00000000 00000000 120400e0 00000000 00000000 00000000 00000000 120400f0 00000000 001f1fee 3230302a 44570140 002 wd dump the i2c registers for i2c port 5 md 0x12050000 0x40 12050000 00000063 00000050 00000055 00000001 c p u 12050010 000000ff 00000020 000000b0 0000003c 12050020 00000082 00000006 00000010 00000200 12050030 00000200 00000711 00000000 00000000 12050040 00000001 00000000 00000000 00000000 12050050 00000000 00000000 00000000 00000000 12050060 00000000 00000000 00000000 00000001 12050070 00000006 00000000 00000000 00000008 12050080 00000000 00000000 00000000 00000000 12050090 00000000 00000064 00000001 00000001 d 120500a0 00000005 00000001 00000000 00000000 120500b0 00000000 00000000 00000000 00000000 120500c0 00000000 00000000 00000000 00000000 120500d0 00000000 00000000 00000000 00000000 120500e0 00000000 00000000 00000000 00000000 120500f0 00000000 001f1fee 3230302a 44570140 002 wd dump the i2c registers for i2c port 6 md 0x12060000 0x40 12060000 0000007f 00000055 00000055 00000001 u u 12060010 00000000 00000190 000001d6 0000003c 12060020 00000082 00000006 00000010 00000000 12060030 000008ff 00000000 00000000 00000000 12060040 00000000 00000000 00000000 00000000 12060050 00000000 00000000 00000000 00000000 12060060 00000000 00000000 00000000 00000004 12060070 00000006 00000000 00000000 00000001 12060080 00000000 00000000 00000000 00000000 12060090 00000000 00000064 00000001 00000000 d 120600a0 00000005 00000001 00000000 00000000 120600b0 00000000 00000000 00000000 00000000 120600c0 00000000 00000000 00000000 00000000 120600d0 00000000 00000000 00000000 00000000 120600e0 00000000 00000000 00000000 00000000 120600f0 00000000 001f1fee 3230302a 44570140 002 wd todo i2c port 5 has i2c target address 0x50 probably in use todo what are the i2c controller registers todo what is i2c target address 0x50 not axp15060 pmic which has i2c address 0x36 page 7 https files pine64 org doc datasheet star64 axp15060 20datasheet 20v0 1 pdf todo check the u boot device tree todo opensbi pmic driver https github com starfive tech opensbi blob jh7110 visionfive2 devel platform generic starfive jh7110 c call opensbi from nuttx read the article star64 jh7110 risc v sbc experiments with opensbi supervisor binary interface https lupyuen github io articles sbi how to call opensbi in nuttx we run this ecall to jump from nuttx in risc v supervisor mode to opensbi in risc v machine mode riscv sbi c calling opensbi in nuttx https github com apache nuttx blob master arch risc v src common supervisor riscv sbi c l52 l77 how ecall works in opensbi https www thegoodpenguin co uk blog an overview of opensbi more about opensbi https courses stephenmarz com my courses cosc562 risc v opensbi calls like this from jh7110 appinit c https github com lupyuen2 wip pinephone nuttx blob sbi boards risc v jh7110 star64 src jh7110 appinit c l155 l237 c after nuttx boots on jh7110 void board late initialize void make an ecall to opensbi int ret test opensbi debugassert ret ok make an ecall to opensbi based on https github com riscv software src opensbi blob master firmware payloads test main c https www thegoodpenguin co uk blog an overview of opensbi int test opensbi void print 123 to debug console with legacy console putchar call sbi console putchar eid 0x01 fid 0 https github com riscv non isa riscv sbi doc blob master src ext legacy adoc sbi ecall sbi ext 0 1 console putchar 0 1 0 0 0 0 0 sbi ecall sbi ext 0 1 console putchar 0 2 0 0 0 0 0 sbi ecall sbi ext 0 1 console putchar 0 3 0 0 0 0 0 sbi ecall makes an ecall to jump from nuttx in risc v supervisor mode to opensbi in risc v machine mode from jh7110 appinit c https github com lupyuen2 wip pinephone nuttx blob sbi boards risc v jh7110 star64 src jh7110 appinit c l268 l299 c make an ecall to opensbi based on https github com apache nuttx blob master arch risc v src common supervisor riscv sbi c l52 l77 https github com riscv software src opensbi blob master firmware payloads test main c static struct sbiret sbi ecall unsigned int extid unsigned int fid uintptr t parm0 uintptr t parm1 uintptr t parm2 uintptr t parm3 uintptr t parm4 uintptr t parm5 struct sbiret ret register long r0 asm a0 long parm0 register long r1 asm a1 long parm1 register long r2 asm a2 long parm2 register long r3 asm a3 long parm3 register long r4 asm a4 long parm4 register long r5 asm a5 long parm5 register long r6 asm a6 long fid register long r7 asm a7 long extid asm volatile ecall r r0 r r1 r r2 r r3 r r4 r r5 r r6 r r7 memory ret error r0 ret value r1 return ret when we run our modified nuttx kernel on star64 jh7110 we see 123 printed on the debug console yay text starting kernel 123 nuttshell nsh nuttx 12 0 3 nsh source https github com lupyuen2 wip pinephone nuttx blob sbi boards risc v jh7110 star64 src jh7110 appinit c l300 l310 but that s calling the legacy console putchar function what about the newer debug console functions let s call the newer debug console functions https github com riscv non isa riscv sbi doc blob master src ext debug console adoc in opensbi from jh7110 appinit c https github com lupyuen2 wip pinephone nuttx blob sbi boards risc v jh7110 star64 src jh7110 appinit c l237 l265 c todo not supported by sbi v1 0 this will return sbi err not supported print 456 to debug console call sbi debug console write eid 0x4442434e fid 0 https github com riscv non isa riscv sbi doc blob master src ext debug console adoc function console write fid 0 const char str 456 struct sbiret sret sbi ecall sbi ext dbcn extension id sbi ext dbcn console write function id strlen str number of bytes unsigned long str address low 0 address high 0 0 0 unused info sret value d sret error d n sret value sret error debugassert sret error sbi success debugassert sret value strlen str todo not supported by sbi v1 0 this will return sbi err not supported print 789 to debug console call sbi debug console write byte eid 0x4442434e fid 2 https github com riscv non isa riscv sbi doc blob master src ext debug console adoc function console write byte fid 2 sret sbi ecall sbi ext dbcn sbi ext dbcn console write byte 7 0 0 0 0 0 sret sbi ecall sbi ext dbcn sbi ext dbcn console write byte 8 0 0 0 0 0 sret sbi ecall sbi ext dbcn sbi ext dbcn console write byte 9 0 0 0 0 0 info sret value d sret error d n sret value sret error debugassert sret error sbi success debugassert sret value strlen str but it fails with sbi err not supported text starting kernel test opensbi sret value 0 sret error 2 test opensbi sret value 0 sret error 2 source https github com lupyuen2 wip pinephone nuttx blob sbi boards risc v jh7110 star64 src jh7110 appinit c l300 l310 why is the debug console not supported on jh7110 opensbi if we trace the starfive jh7110 source code 1 browse to github com starfive tech visionfive2 https github com starfive tech visionfive2 1 click the opensbi folder https github com starfive tech opensbi tree c6a092cd80112529cb2e92e180767ff5341b22a3 it says opensbi fully supports sbi specification v0 2 current version of sbi spec is 2 0 draft opensbi implements a 4 year old spec but then we see this sbi ecall h https github com starfive tech opensbi blob c6a092cd80112529cb2e92e180767ff5341b22a3 include sbi sbi ecall h l16 l17 c define sbi ecall version major 1 define sbi ecall version minor 0 which is returned by get spec version https github com starfive tech opensbi blob c6a092cd80112529cb2e92e180767ff5341b22a3 lib sbi sbi ecall base c l43 l48 so jh7110 opensbi probably implements sbi v1 0 sbi v1 0 also appears in the jh7110 opensbi log text runtime sbi version 1 0 source https gist github com lupyuen 1e009a3343da70257d6f24400339053f file nuttx scheme star64 log l30 sbi v1 0 appears in the jh7110 opensbi log https lupyuen github io images sbi title png what exactly is in sbi v0 2 and v1 0 here are the sbi specs sbi spec v0 2 https github com riscv non isa riscv sbi doc blob v0 2 0 riscv sbi adoc jan 2020 sbi spec v1 0 https github com riscv non isa riscv sbi doc blob v1 0 0 riscv sbi adoc mar 2022 definitely no debug console in there when was debug console added to the sbi spec debug console appears in sbi spec v2 0 rc1 https github com riscv non isa riscv sbi doc blob v2 0 rc1 riscv sbi adoc jun 2023 but there isn t an official sbi spec v2 0 yet and the debug console code is already inside jh7110 opensbi sbi ecall dbcn c https github com starfive tech opensbi blob c6a092cd80112529cb2e92e180767ff5341b22a3 lib sbi sbi ecall dbcn c so why can t we call the debug console our jh7110 firmware seems to be built in jan 2023 https gist github com lupyuen 1e009a3343da70257d6f24400339053f file nuttx scheme star64 log l4 but debug console was only implemented in feb 2023 https github com starfive tech opensbi commits c6a092cd80112529cb2e92e180767ff5341b22a3 lib sbi sbi ecall dbcn c maybe that s why we can t call the debug console on jh7110 opensbi fyi upstream opensbi now supports sbi 2 0 https github com riscv software src opensbi commit cbdd86973901b6be2a1a2d3d6b54f3184fdf9a44 todo call sbi get spec version sbi get impl id sbi get impl version sbi probe extension sbi get mvendorid sbi get marchid sbi get mimpid pinetab v factory test code the pinetab v ships with factory test code https wiki pine64 org wiki pinetab v releases factory releases pinetab v factory test code https lupyuen github io images pinetabv factory jpg the factory test reference source code has been mirrored here for quicker downloading pinetab v factorytestcode sdk 20230725 tar gz https drive google com file d 1ozkcgfvvytn36jlebxt9 89blbohm5on view usp drive link let s look inside the factory test code pinetab v device tree lcd panel in pinetab v is actually boe th101mb31ig002 28a https fosstodon org fishwaldo 110902984462760802 inside the pinetab v factory test code from previous section we see the pinetab v device tree for linux visionfive2 linux arch riscv boot dts starfive jh7110 visionfive v2 dtsi https github com lupyuen nuttx star64 blob main pinetabv jh7110 visionfive v2 dtsi from the above device tree we see the lcd panel starfive jadard on mipi dsi1 and touch panel goodix gt911 text i2c2 clock frequency 100000 i2c sda hold time ns 300 i2c sda falling time ns 510 i2c scl falling time ns 510 auto calc scl lhcnt status okay panel radxa 19 status okay compatible starfive jadard reg 0x19 reset gpio gpio 23 0 blen gpio gpio 45 0 enable gpio gpio 37 0 port panel out1 endpoint remote endpoint dsi1 output touchscreen 14 status okay compatible goodix gt911 reg 0x14 irq gpios gpio 30 gpio active high reset gpios gpio 31 gpio active high which maps to this linux driver for starfive jadard display panel which one er88577b visionfive2 linux drivers gpu drm panel panel er88577b c https github com lupyuen nuttx star64 blob main panel er88577b c jd9365da h3 visionfive2 linux drivers gpu drm panel panel jadard jd9365da h3 c https github com lupyuen nuttx star64 blob main panel jadard jd9365da h3 c starfive jadard is also mentioned in jh7110 mipi lcd developing and porting guide https doc en rvspace org visionfive2 dg lcd jh7110 sdk configuration for 1c4l port html we also see the galaxycore gc02m2 camera on mipi csi text gpio gc02m2 pins gc02m2 pins gc02m2pins pwdn starfive pins pad gpio25 starfive pinmux pad gpio25 func sel 0 starfive pin ioconfig io gpio ie 1 starfive pin gpio dout gpo high starfive pin gpio doen oen low gc02m2 pins rst starfive pins pad gpio33 starfive pinmux pad gpio33 func sel 0 starfive pin ioconfig io gpio ie 1 starfive pin gpio dout gpo high starfive pin gpio doen oen low gc02m2 pins sw starfive pins pad gpio53 starfive pinmux pad gpio53 func sel 0 starfive pin ioconfig io gpio ie 1 starfive pin gpio dout gpo low starfive pin gpio doen oen low i2c6 clock frequency 100000 i2c sda hold time ns 300 i2c sda falling time ns 510 i2c scl falling time ns 510 auto calc scl lhcnt pinctrl names default pinctrl 0 i2c6 pins status okay gc02m2 gc02m2 37 status okay compatible galaxycore gc02m2 pinctrl names default pinctrl 0 gc02m2 pins reg 0x37 clocks clk ext camera clock names xvclk reset gpio gpio 33 gpio active high pwdn gpio gpio 25 gpio active low sw gpios gpio 53 gpio active low port gc02m2 to csi2rx0 endpoint remote endpoint csi2rx0 from gc02m2 bus type 4 mipi csi 2 d phy data lanes 1 link frequencies bits 64 336000000 vin sysctl when use dvp open this pinctrl status okay ports address cells 1 size cells 0 port 1 reg 1 address cells 1 size cells 0 csi2rx0 from gc02m2 endpoint 1 reg 1 remote endpoint gc02m2 to csi2rx0 bus type 4 mipi csi 2 d phy clock lanes 0 data lanes 2 1 lane polarities 0 0 0 status okay ram disk address for risc v qemu read the article star64 jh7110 nuttx rtos risc v semihosting and initial ram disk https lupyuen github io articles semihost can we enable logging for risc v qemu yep we use the trace option like this bash qemu system riscv64 semihosting m virt aclint on cpu rv64 smp 8 bios none kernel nuttx initrd initrd nographic trace in the qemu command above we loaded the initial ram disk initrd to discover the ram address of the initial ram disk we check the qemu trace log text resettablloader write rom nuttx elf program header segment 0 0x80000000 size 0x2b374 rom 0 loader write rom nuttx elf program header segment 1 0x80200000 size 0x2a1 rom 0 loader write rom initrd 0x84000000 size 0x2fc3e8 rom 0 loader write rom fdt 0x87000000 size 0x100000 rom 0 so initial ram disk is loaded at 0x8400 0000 ramdisk start from the previous section also we see that kernel is loaded at 0x8000 0000 device tree at 0x8700 0000 device tree for risc v qemu read the article star64 jh7110 nuttx rtos risc v semihosting and initial ram disk https lupyuen github io articles semihost to dump the device tree for qemu risc v we specify dumpdtb bash dump device tree for qemu risc v qemu system riscv64 semihosting m virt aclint on dumpdtb qemu riscv64 dtb cpu rv64 smp 8 bios none kernel nuttx nographic convert device tree to text format dtc o qemu riscv64 dts o dts i dtb qemu riscv64 dtb this produces the device tree for qemu risc v qemu riscv64 dts device tree for qemu risc v https github com lupyuen nuttx star64 blob main qemu riscv64 dts which is helpful for browsing the memory addresses of i o peripherals scheme interpreter crashes on nuttx why does scheme interpreter crash on nuttx let s run the scheme interpreter on nuttx qemu for easier debugging github com kendickey nuttx umb scheme https github com kendickey nuttx umb scheme here are the steps bash pushd apps interpreters git submodule add https github com kendickey nuttx umb scheme umb scheme popd we use the updated nuttx config from https github com lupyuen2 wip pinephone nuttx blob malloc2a boards risc v qemu rv rv virt configs knsh64 defconfig config arch setjmp h y config libm y config arch pgpool size 16777216 and the updated linker script from https github com lupyuen2 wip pinephone nuttx blob malloc2a boards risc v qemu rv rv virt scripts ld kernel64 script l25 pgram rwx origin 0x80400000 length 16m make distclean tools configure sh rv virt knsh64 make remember to build the apps filesystem copy scheme prelude cp apps interpreters umb scheme prelude scheme apps bin qemu system riscv64 semihosting m virt aclint on cpu rv64 smp 8 bios none kernel nuttx nographic here s the output nuttx scheme crashes on qemu https gist github com lupyuen 5c225a3a30086cd35455463955f5ff64 our crash dump see below says yaml exception load page fault mcause 000000000000000d epc 00000000c000f366 mtval 0000000000000030 exception program counter is c000f366 we disregard the c000 because nuttx maps the scheme app into the risc v user memory space at c0000000 so actual program counter is f366 bash config arch data npages 128 config arch data vbase 0xc0100000 config arch heap npages 128 config arch heap vbase 0xc0200000 config arch text npages 128 config arch text vbase 0xc0000000 source https github com apache nuttx blob master boards risc v jh7110 star64 configs nsh defconfig l25 l39 we look up f366 in the disassembly bash dump the scheme disassembly to scheme s riscv64 unknown elf objdump t s demangle line numbers wide apps bin scheme scheme s 2 1 and we see this disassembly text 000000000000f360 l29 apps interpreters umb scheme architecture c 556 while strcmp name get symbol name this entry symbol 0 f360 0004b903 ld s2 0 s1 f364 8522 mv a0 s0 crashes here f366 03093583 ld a1 48 s2 f36a 00000097 auipc ra 0x0 f36e 000080e7 jalr ra f36a l29 0xa are we sure that s the crashing code text crashes here f366 03093583 ld a1 48 s2 let s check the risc v registers our crash dump see below says text mtval 0000000000000030 which means that our scheme app crashed while accessing address 0x30 which is invalid so 48 s2 should equal 0x30 the crash dump says yaml up dump register s0 00000000c01017f8 s1 00000000c0201ef0 s2 0000000000000000 s3 0000000000000000 which means register s2 is 0 and 48 s2 means s2 48 which is 0x30 yep we have the right line of crashing code why did this fail is this entry null from architecture c https github com kendickey nuttx umb scheme blob main architecture c l553 l556 c public object intern name string name integer hash value hash name if hash entry null else hash entry is non null boolean at end false this entry becomes non null entry this entry hash entry crashes here while strcmp name get symbol name this entry symbol 0 actually if we read the code above we see that this entry is on the stack and can never be null maybe there s stack corruption we see something interesting in the crash dump below the app stack is full text stacksize used filled command 2048 2040 99 6 irq 3056 1808 59 1 idle task 1968 752 38 2 lpwork 0x802015f0 0x80201618 3008 744 24 7 system bin init 2000 2000 100 0 scheme in the next section we increase the interrupt and app stack sizes meanwhile here s the complete crash dump https gist github com lupyuen 5c225a3a30086cd35455463955f5ff64 yaml riscv exception exception load page fault mcause 000000000000000d epc 00000000c000f366 mtval 0000000000000030 riscv exception panic exception 000000000000000d assert current version nuttx 12 3 0 rc0 322455f oct 12 2023 15 48 34 risc v assert assertion failed panic at file common riscv exception c 85 task system bin init process system bin init 0xc000004a up dump register epc 00000000c000f366 up dump register a0 00000000c01017f8 a1 000000000fffffff a2 00000000c01017fe a3 0000000000000000 up dump register a4 00000000000003f1 a5 0000000000001610 a6 00000000c0226380 a7 fffffffffffffff8 up dump register t0 000000008000729a t1 00000000c0003af8 t2 00000000000001ff t3 000000000000006c up dump register t4 0000000000000068 t5 0000000000000009 t6 000000000000002a up dump register s0 00000000c01017f8 s1 00000000c0201ef0 s2 0000000000000000 s3 0000000000000000 up dump register s4 00000000c001ea34 s5 00000000c0166038 s6 00000000c01017f8 s7 000000000000003b up dump register s8 0000000000000021 s9 0000000000000019 s10 0000000000000000 s11 0000000000000000 up dump register sp 00000000c0202210 fp 00000000c01017f8 tp 0000000000000000 ra 00000000c000cbda dump stack user stack dump stack base 0xc0202040 dump stack size 00003008 dump stack sp 0xc0202210 stack dump 0xc0202200 00000063 00000000 c000c00e 00000000 c001ea34 00000000 c0165f78 00000000 stack dump 0xc0202220 c0166040 00000000 0000006c 00000000 c0265a50 00000000 c000cbda 00000000 stack dump 0xc0202240 c0265a50 00000000 00000019 00000000 00000021 00000000 0000003b 00000000 stack dump 0xc0202260 c01017f8 00000000 c0166038 00000000 c001ea34 00000000 c0265a50 00000000 stack dump 0xc0202280 c0166040 00000000 c0166048 00000000 c01660a0 00000000 c000cdc8 00000000 stack dump 0xc02022a0 c001ea34 00000000 c0265a50 00000000 c0166040 00000000 c0166048 00000000 stack dump 0xc02022c0 c01660a0 00000000 c000cdc8 00000000 c001ea34 00000000 c0165f78 00000000 stack dump 0xc02022e0 c0166040 00000000 c0166048 00000000 c0265a50 00000000 c000c6e0 00000000 stack dump 0xc0202300 c0166048 00000000 00000000 00000000 c0101cb0 00000000 c0165f98 00000000 stack dump 0xc0202320 c0165f18 00000000 c0165ff4 00000000 c0166048 00000000 c0265a50 00000000 stack dump 0xc0202340 c0101cb0 00000000 c0166048 00000000 c01660a0 00000000 c000cdc8 00000000 stack dump 0xc0202360 c0101cb0 00000000 c0265a50 00000000 c0101cb0 00000000 c0166048 00000000 stack dump 0xc0202380 c01660a0 00000000 c000cf0a 00000000 c0166048 00000000 c0265a50 00000000 stack dump 0xc02023a0 c0101cb0 00000000 c0166048 00000000 c01660a0 00000000 c000cf0a 00000000 stack dump 0xc02023c0 c0166048 00000000 c0265a50 00000000 c0101cb0 00000000 c0166048 00000000 stack dump 0xc02023e0 c01660a0 00000000 c000cdc8 00000000 c0101cb0 00000000 c0265a50 00000000 stack dump 0xc0202400 c0101cb0 00000000 c0166048 00000000 c01660a0 00000000 c000cf0a 00000000 stack dump 0xc0202420 c0166048 00000000 c0265a50 00000000 c0101cb0 00000000 c0166048 00000000 stack dump 0xc0202440 c01660a0 00000000 c000cf0a 00000000 c0166048 00000000 c0265a50 00000000 stack dump 0xc0202460 c0101cb0 00000000 c0166048 00000000 c01660a0 00000000 c000cf0a 00000000 stack dump 0xc0202480 c0166048 00000000 0000c34f 00000000 c0265a50 00000000 c01660a0 00000000 stack dump 0xc02024a0 00000000 00000000 c00025fa 00000000 00000000 00000000 00000000 00000000 stack dump 0xc02024c0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0xc02024e0 00000001 00000000 c0265a20 00000000 c0265a50 00000000 c0008112 00000000 stack dump 0xc0202500 00000000 00000000 00000000 00000000 c0166048 00000000 c0002558 00000000 stack dump 0xc0202520 00000000 00000000 c00028c4 00000000 deadbeef deadbeef 00000000 00000000 stack dump 0xc0202540 6c756e28 2e2f296c 65686373 de00656d deadbeef deadbeef deadbeef deadbeef stack dump 0xc0202560 deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef stack dump 0xc0202580 deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef stack dump 0xc02025a0 deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef stack dump 0xc02025c0 deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef stack dump 0xc02025e0 deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef stack dump 0xc0202600 deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef stack dump 0xc0202620 deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef stack dump 0xc0202640 636c6557 20656d6f 55206f74 5320424d 6d656863 76202c65 69737265 33206e6f stack dump 0xc0202660 2020322e 79706f43 68676972 63282074 39312029 312c3838 20363939 6c6c6957 stack dump 0xc0202680 206d6169 61432052 6562706d 0a2e6c6c 20424d55 65686353 6320656d 73656d6f stack dump 0xc02026a0 74697720 42412068 554c4f53 594c4554 204f4e20 52524157 59544e41 6854202e stack dump 0xc02026c0 69207369 72662073 73206565 7774666f 20657261 0a646e61 20756f79 20657261 stack dump 0xc02026e0 65657266 206f7420 69646572 69727473 65747562 20746920 65646e75 65632072 stack dump 0xc0202700 69617472 6f63206e 7469646e 736e6f69 65530a2e 68742065 4d552065 63532042 stack dump 0xc0202720 656d6568 6c655220 65736165 746f4e20 66207365 6420726f 69617465 202e736c stack dump 0xc0202740 7079540a 28602065 74697865 6f206029 6f432072 6f72746e 20642d6c 65206f74 stack dump 0xc0202760 2e746978 de000a0a deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef stack dump 0xc0202780 deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef stack dump 0xc02027a0 deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef stack dump 0xc02027c0 deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef 00000000 00000000 stack dump 0xc02027e0 00000000 00000000 c00023f6 00000000 deadbeef deadbeef 8000a9f8 00000000 stack dump 0xc0202800 00000000 00000000 00030d51 00000000 c0101060 00000000 c001d630 00000000 stack dump 0xc0202820 00000000 00000000 c0101060 00000000 c001d640 00000000 00000000 00000000 stack dump 0xc0202840 c01011e0 00000000 c001d650 00000000 00000000 00000000 c01011e0 00000000 stack dump 0xc0202860 c001d660 00000000 00000000 00000000 c0101210 00000000 c001d670 00000000 stack dump 0xc0202880 00000000 00000000 c01014b0 00000000 c001d420 00000000 c0202888 00000000 stack dump 0xc02028a0 00000000 00000000 c0202870 00000000 00000000 00000000 c0200560 00000000 stack dump 0xc02028c0 c01014b0 00000000 c001d420 00000000 00000000 00000000 c0202888 00000000 stack dump 0xc02028e0 c0202870 00000000 00000000 00000000 c0200580 00000000 c01014b0 00000000 stack dump 0xc0202900 c001d420 00000000 c02028f8 00000000 c0202888 00000000 c0202870 00000000 stack dump 0xc0202920 00000000 00000000 c02005b0 00000000 c01014b0 00000000 c001d420 00000000 stack dump 0xc0202940 c02028c0 00000000 c0202888 00000000 c0202870 00000000 00000000 00000000 stack dump 0xc0202960 c02005f0 00000000 c01014b0 00000000 c001d420 00000000 c02028c0 00000000 stack dump 0xc0202980 c0202888 00000000 c0202870 00000000 00000000 00000000 c0200630 00000000 stack dump 0xc02029a0 c01014b0 00000000 c001d420 00000000 c02028c0 00000000 c0202888 00000000 stack dump 0xc02029c0 c0202870 00000000 00000000 00000000 c0200670 00000000 c01014b0 00000000 stack dump 0xc02029e0 c001d420 00000000 c02028c0 00000000 c0202888 00000000 c0202870 00000000 stack dump 0xc0202a00 00000000 00000000 c02006b0 00000000 c01014b0 00000000 c001d420 00000000 stack dump 0xc0202a20 c02028c0 00000000 c0202888 00000000 c0202870 00000000 00000000 00000000 stack dump 0xc0202a40 c02006f0 00000000 c01014b0 00000000 c001d420 00000000 c02028c0 00000000 stack dump 0xc0202a60 c0202888 00000000 c0202870 00000000 00000000 00000000 c0200730 00000000 stack dump 0xc0202a80 c01014b0 00000000 c001d420 00000000 c02028c0 00000000 c0202888 00000000 stack dump 0xc0202aa0 c0202870 00000000 00000000 00000000 c0200770 00000000 c01014b0 00000000 stack dump 0xc0202ac0 c001d420 00000000 c02028c0 00000000 c0202888 00000000 c0202870 00000000 stack dump 0xc0202ae0 00000000 00000000 c02007b0 00000000 c0101360 00000000 c001d420 00000000 stack dump 0xc0202b00 00000001 00000000 c0200308 00000000 c02007d0 00000000 c0101360 00000000 stack dump 0xc0202b20 c001d420 00000000 00000000 00000000 c02003a8 00000000 c02007f0 00000000 stack dump 0xc0202b40 c0101360 00000000 c001d420 00000000 00000000 00000000 c0200448 00000000 stack dump 0xc0202b60 c0200810 00000000 c0101270 00000000 c001d720 00000000 00000000 00000000 stack dump 0xc0202b80 c0101240 00000000 c001d420 00000000 c0202870 00000000 00000000 00000000 stack dump 0xc0202ba0 c0202870 00000000 00000000 00000000 00000000 00000000 c0101390 00000000 stack dump 0xc0202bc0 c001d420 00000000 c001f490 00000000 00000000 00000000 c000fc58 00000000 stack dump 0xc0202be0 00000001 00000000 fffffffe ffffffff c01014b0 00000000 c001d420 00000000 dump tasks pid group pri policy type npx state event sigmask stackbase stacksize used filled command dump tasks 0x802002b0 2048 2040 99 6 irq dump task 0 0 0 fifo kthread n ready 0000000000000000 0x80206010 3056 1520 49 7 idle task dump task 1 1 100 rr kthread waiting semaphore 0000000000000000 0x8020a050 1968 752 38 2 lpwork 0x802015f0 0x80201618 dump task 2 2 100 rr task waiting semaphore 0000000000000000 0xc0202040 3008 848 28 1 system bin init dump task 3 3 100 rr task running 0000000000000000 0xc0202030 2000 2000 100 0 scheme f 0 r d p increase stack size for scheme interpreter scheme interpreter crashes on nuttx because the app stack size is too small 2000 bytes text stacksize used filled command 2048 2040 99 6 irq 3056 1808 59 1 idle task 1968 752 38 2 lpwork 0x802015f0 0x80201618 3008 744 24 7 system bin init 2000 2000 100 0 scheme but we already set config interpreters umb scheme stacksize 8192 https github com kendickey nuttx umb scheme blob main kconfig apparently it doesn t work maybe because we re running in nuttx kernel mode instead of nuttx flat mode this is how we increase the app stack size to 8192 in config bash config posix spawn default stacksize 8192 after increasing the app stack size the scheme app doesn t crash any more before setting config posix spawn default stacksize https gist github com lupyuen 5c225a3a30086cd35455463955f5ff64 after setting config posix spawn default stacksize https gist github com lupyuen 572e6018ed982fe42b2b5ed40ffae505 scheme runs ok on star64 yay https gist github com lupyuen 1e009a3343da70257d6f24400339053f to be safe we increase the default stack size interrupt stack size and other kernel stack sizes knsh64 defconfig https github com lupyuen2 wip pinephone nuttx commit 7b8ee95d2dfd848051da17ab7dd74b56ef59c94d bash config arch interruptstack 8192 config arch kernel stacksize 8192 config default task stacksize 8192 config idlethread stacksize 8192 use default values config init stacksize 8192 config posix spawn default stacksize 8192 this shows that the interrupt and kernel stacks have been increased text stacksize used filled command 8192 8184 99 9 irq 8176 1824 22 3 idle task 8112 720 8 8 lpwork 0x80202df0 0x80202e18 8128 848 10 4 system bin init todo why is interrupt stack full again todo explore run time stack checking https cwiki apache org confluence plugins servlet mobile contentid 139629451 content view 139629451 read on to find out what caused the app stack to overflow analyse the stack dump for scheme interpreter todo enable rtos features stack backtrace in menuconfig sched backtrace in the previous section we saw the scheme app crashing on nuttx qemu due to stack overflow but why what are the function calls leading to the crash let s construct the stack backtrace we search for other code addresses in the stack dump above text grep c00 0 1 only matching tmp a log c000f366 c000004a c0003af8 c001ea34 c000cbda c000c00e c000cdc8 c000c6e0 c000cf0a c00025fa c0008112 c0002558 c00028c4 c00023f6 c001d630 c001d640 c001d650 c001d660 c001d670 c001d420 c001d720 c001f490 c000fc58 we match the above code addresses to the scheme app disassembly from the previous section remember to disregard the c00 prefix because that s the risc v user memory space https github com apache nuttx blob master boards risc v jh7110 star64 configs nsh defconfig l25 l39 note that these code addresses are the return addresses so we look up the previous instruction that appears in the scheme app disassembly c c000f366 intern name calls get symbol name the crashing code from previous section apps interpreters umb scheme architecture c 556 public object intern name string name while strcmp name get symbol name this entry symbol 0 c0003af8 we skip this not really meaningful nuttx libs libc stdio lib libfilelock c 64 void funlockfile far struct file struct stream nxrmutex unlock stream fs lock c000cbda read calls intern name apps interpreters umb scheme io c 336 read a scheme object from input file leave it in value register public void read file input file value register intern name token string c000c00e read symbol calls peek char apps interpreters umb scheme io c 726 we do a naive scan scanning up to a delimiter this allows for more than is described in the formal syntax we do eliminate control characters private void read symbol ch input file character ch leading character of symbol file input file containing remaining chars while is delimiter peek char input file c000cdc8 read list calls read apps interpreters umb scheme io c 446 read list from input file and leave it in value register this allows the input x it treats it as equivalent to x which is not strictly legal according to the manual private void read list file input file read input file c000c6e0 read calls itself recursively apps interpreters umb scheme io c 415 discriminator 4 read a scheme object from input file leave it in value register public void read file input file case comma at token read input file c000cf0a read list calls itself recursively apps interpreters umb scheme io c 483 discriminator 4 read list from input file and leave it in value register this allows the input x it treats it as equivalent to x which is not strictly legal according to the manual private void read list file input file read list input file c00025fa read eval print calls read apps interpreters umb scheme steering c 208 public void read eval print input file input c file from which expressions are read read input c0008112 load calls read eval print apps interpreters umb scheme primitive c 1479 load filename used to load the standard prelude hence is public public void load read eval print load file c0002558 load file calls load apps interpreters umb scheme steering c 197 discriminator 2 private void load file string filename load c00028c4 steering calls load file apps interpreters umb scheme steering c 142 private void steering load file standard prelude pathname c00023f6 nuttx start calls scheme main nuttx arch risc v src common crt0 c 187 void start int argc char argv call the main entry point passing argc and argv ret main argc argv c000fc58 we skip this not really meaningful apps interpreters umb scheme number c 148 number object private void number predicate value register is number top 1 the true object what does this stack backtrace tell us when we read the function calls from bottom to top 1 nuttx start calls scheme main https github com lupyuen2 wip pinephone nuttx blob malloc2a arch risc v src common crt0 c l184 l187 nuttx starts our scheme app 1 main calls steering which calls load file https github com kendickey nuttx umb scheme blob main steering c l138 l143 scheme app loads the prelude script 1 loadfile calls load https github com kendickey nuttx umb scheme blob main steering c l197 scheme app loads the prelude script 1 load calls read eval print https github com kendickey nuttx umb scheme blob main primitive c l1477 l1479 scheme app executes the prelude script 1 read eval print calls read https github com kendickey nuttx umb scheme blob main steering c l207 l208 scheme app reads the prelude script 1 read calls itself recursively https github com kendickey nuttx umb scheme blob main io c l415 scheme app reads the scheme expressions recursively 1 read calls intern name https github com kendickey nuttx umb scheme blob main io c l333 l337 scheme app maps a symbol token to the internal name 1 intern name calls get symbol name https github com kendickey nuttx umb scheme blob main architecture c l553 l556 scheme app tries to get the symbol token s internal name and crashes here which says that the scheme app tried to load the scheme prelude script at startup and crashed with a stack overflow so why did the scheme app crash with a stack overflow remember that our nuttx app stack was only 2000 bytes text stacksize used filled command 2048 2040 99 6 irq 3056 1808 59 1 idle task 1968 752 38 2 lpwork 0x802015f0 0x80201618 3008 744 24 7 system bin init 2000 2000 100 0 scheme and the scheme app was recursively executing a scheme prelude script that s why it needs extra stack space to work mystery solved todo todo port up mtimer initialize https github com lupyuen2 wip pinephone nuttx blob star64a arch risc v src qemu rv qemu rv timerisr c l151 l210 to star64 todo risc v exceptions riscv exception common s https github com lupyuen2 wip pinephone nuttx blob star64 arch risc v src common riscv exception common s l77 todo handle machine exception https github com lupyuen2 wip pinephone nuttx blob star64d arch risc v src qemu rv qemu rv exception m s l64 todo check polarfire icicle https lupyuen github io articles privilege other risc v ports of nuttx todo check linux boot code https github com torvalds linux blob master arch riscv kernel head s todo linux sbi interface https github com torvalds linux blob master arch riscv kernel sbi c u boot bootloader log for tftp text u boot spl 2021 10 jan 19 2023 04 09 41 0800 ddr version dc2e84f0 trying to boot from spi u boot spl 2021 10 jan 19 2023 04 09 41 0800 ddr version dc2e84f0 trying to boot from spi opensbi v1 2 platform name starfive visionfive v2 platform features medeleg platform hart count 5 platform ipi device aclint mswi platform timer device aclint mtimer 4000000hz platform console device uart8250 platform hsm device jh7110 hsm platform pmu device platform reboot device pm reset platform shutdown device pm reset firmware base 0x40000000 firmware size 288 kb runtime sbi version 1 0 domain0 name root domain0 boot hart 1 domain0 harts 0 1 2 3 4 domain0 region00 0x0000000002000000 0x000000000200ffff i domain0 region01 0x0000000040000000 0x000000004007ffff domain0 region02 0x0000000000000000 0xffffffffffffffff r w x domain0 next address 0x0000000040200000 domain0 next arg1 0x0000000042200000 domain0 next mode s mode domain0 sysreset yes boot hart id 1 boot hart domain root boot hart priv version v1 11 boot hart base isa rv64imafdcbx boot hart isa extensions none boot hart pmp count 8 boot hart pmp granularity 4096 boot hart pmp address bits 34 boot hart mhpm count 2 boot hart mideleg 0x0000000000000222 boot hart medeleg 0x000000000000b109 u boot 2021 10 jan 19 2023 04 09 41 0800 build jenkins github visionfive2 6 cpu rv64imacu model starfive visionfive v2 dram 8 gib mmc sdio0 16010000 0 sdio1 16020000 1 loading environment from spiflash sf detected gd25lq128 with page size 256 bytes erase size 4 kib total 16 mib warning bad crc using default environment starfive eeprom format v2 eeprom info vendor pine64 product full sn star64v1 2310 d008e000 00000003 data version 0x2 pcb revision 0xc1 bom revision a ethernet mac0 address 6c cf 39 00 75 5d ethernet mac1 address 6c cf 39 00 75 5e eeprom info in serial 10000000 out serial 10000000 err serial 10000000 model starfive visionfive v2 net eth0 ethernet 16030000 eth1 ethernet 16040000 card did not respond to voltage select 110 card did not respond to voltage select 110 bootmode flash device 0 card did not respond to voltage select 110 hit any key to stop autoboot 2 1 0 card did not respond to voltage select 110 couldn t find partition mmc 0 3 can t set block device importing environment from mmc0 warning input data exceeds 1048576 bytes truncated info input data size 1048578 0x100002 card did not respond to voltage select 110 couldn t find partition mmc 1 2 can t set block device warning defaulting to text format error boot2 not defined card did not respond to voltage select 110 ethernet 16030000 waiting for phy auto negotiation to complete done bootp broadcast 1 unhandled dhcp option in offer ack 43 unhandled dhcp option in offer ack 43 dhcp client bound to address 192 168 x x 351 ms using ethernet 16030000 device tftp from server 192 168 x x our ip address is 192 168 x x filename boot scr uimg load address 0x43900000 loading tftp server died starting again bootp broadcast 1 unhandled dhcp option in offer ack 43 unhandled dhcp option in offer ack 43 dhcp client bound to address 192 168 x x 576 ms using ethernet 16030000 device tftp from server 192 168 x x our ip address is 192 168 x x filename boot scr uimg load address 0x40200000 loading tftp server died starting again starfive setenv tftp server 192 168 x x starfive tftpboot kernel addr r tftp server image using ethernet 16030000 device tftp from server 192 168 x x our ip address is 192 168 x x filename image load address 0x40200000 loading t 8c 8c 8c 221 7 kib s done bytes transferred 2097832 2002a8 hex starfive tftpboot fdt addr r tftp server jh7110 star64 pine64 dtb using ethernet 16030000 device tftp from server 192 168 x x our ip address is 192 168 x x filename jh7110 star64 pine64 dtb load address 0x46000000 loading 8c 374 kib s done bytes transferred 50235 c43b hex starfive fdt addr fdt addr r starfive booti kernel addr r fdt addr r flattened device tree blob at 46000000 booting using the fdt blob at 0x46000000 using device tree in place at 0000000046000000 end 000000004600f43a starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123067dfaghbc u boot bootloader log for auto network boot text u boot spl 2021 10 jan 19 2023 04 09 41 0800 ddr version dc2e84f0 trying to boot from spi opensbi v1 2 platform name starfive visionfive v2 platform features medeleg platform hart count 5 platform ipi device aclint mswi platform timer device aclint mtimer 4000000hz platform console device uart8250 platform hsm device jh7110 hsm platform pmu device platform reboot device pm reset platform shutdown device pm reset firmware base 0x40000000 firmware size 288 kb runtime sbi version 1 0 domain0 name root domain0 boot hart 1 domain0 harts 0 1 2 3 4 domain0 region00 0x0000000002000000 0x000000000200ffff i domain0 region01 0x0000000040000000 0x000000004007ffff domain0 region02 0x0000000000000000 0xffffffffffffffff r w x domain0 next address 0x0000000040200000 domain0 next arg1 0x0000000042200000 domain0 next mode s mode domain0 sysreset yes boot hart id 1 boot hart domain root boot hart priv version v1 11 boot hart base isa rv64imafdcbx boot hart isa extensions none boot hart pmp count 8 boot hart pmp granularity 4096 boot hart pmp address bits 34 boot hart mhpm count 2 boot hart mideleg 0x0000000000000222 boot hart medeleg 0x000000000000b109 u boot 2021 10 jan 19 2023 04 09 41 0800 build jenkins github visionfive2 6 cpu rv64imacu model starfive visionfive v2 dram 8 gib mmc sdio0 16010000 0 sdio1 16020000 1 loading environment from spiflash sf detected gd25lq128 with page size 256 bytes erase size 4 kib total 16 mib ok starfive eeprom format v2 eeprom info vendor pine64 product full sn star64v1 2310 d008e000 00000003 data version 0x2 pcb revision 0xc1 bom revision a ethernet mac0 address 6c cf 39 00 75 5d ethernet mac1 address 6c cf 39 00 75 5e eeprom info in serial 10000000 out serial 10000000 err serial 10000000 model starfive visionfive v2 net eth0 ethernet 16030000 eth1 ethernet 16040000 card did not respond to voltage select 110 card did not respond to voltage select 110 bootmode flash device 0 card did not respond to voltage select 110 hit any key to stop autoboot 2 1 0 card did not respond to voltage select 110 couldn t find partition mmc 0 3 can t set block device importing environment from mmc0 card did not respond to voltage select 110 couldn t find partition mmc 1 2 can t set block device warning defaulting to text format error boot2 not defined card did not respond to voltage select 110 ethernet 16030000 waiting for phy auto negotiation to complete done bootp broadcast 1 unhandled dhcp option in offer ack 43 unhandled dhcp option in offer ack 43 dhcp client bound to address 192 168 x x 550 ms using ethernet 16030000 device tftp from server 192 168 x x our ip address is 192 168 x x filename boot scr uimg load address 0x43900000 loading tftp server died starting again bootp broadcast 1 unhandled dhcp option in offer ack 43 unhandled dhcp option in offer ack 43 dhcp client bound to address 192 168 x x 547 ms using ethernet 16030000 device tftp from server 192 168 x x our ip address is 192 168 x x filename boot scr uimg load address 0x40200000 loading tftp server died starting again using ethernet 16030000 device tftp from server 192 168 x x our ip address is 192 168 x x filename image load address 0x40200000 loading 8c t t 8c 8c 147 5 kib s done bytes transferred 2097832 2002a8 hex using ethernet 16030000 device tftp from server 192 168 x x our ip address is 192 168 x x filename jh7110 star64 pine64 dtb load address 0x46000000 loading t 8c 8 8 kib s done bytes transferred 50235 c43b hex flattened device tree blob at 46000000 booting using the fdt blob at 0x46000000 using device tree in place at 0000000046000000 end 000000004600f43a starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123067dfaghbcunhandled exception store amo access fault epc 0000000040200628 ra 00000000402004ba tval ffffff8000008000 epc ffffffff804ba628 ra ffffffff804ba4ba reloc adjusted sp 0000000040406a30 gp 00000000ff735e00 tp 0000000000000001 t0 0000000010000000 t1 0000000000000037 t2 ffffffffffffffff s0 0000000040400000 s1 0000000000000200 a0 0000000000000003 a1 0000080000008000 a2 0000000010100000 a3 0000000040400000 a4 0000000000000026 a5 0000000000000000 a6 00000000101000e7 a7 0000000000000000 s2 0000080000008000 s3 0000000040600000 s4 0000000040400000 s5 0000000000000000 s6 0000000000000026 s7 00fffffffffff000 s8 0000000040404000 s9 0000000000001000 s10 0000000040400ab0 s11 0000000000200000 t3 0000000000000023 t4 000000004600f43a t5 000000004600d000 t6 000000004600cfff code 879b 0277 d7b3 00f6 f793 1ff7 078e 95be b023 0105 resetting reset not supported yet error please reset the board nuttx logs nuttx star64 binary loader log text starting kernel clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123067dfhbcqemu rv kernel mappings map i o regions qemu rv kernel mappings map kernel text qemu rv kernel mappings map kernel data qemu rv kernel mappings connect the l1 and l2 page tables qemu rv kernel mappings map the page pool qemu rv mm init mmu enable satp 1077956608 inx start entry elf initialize registering elf uart register registering dev console uart register registering dev ttys0 work start lowpri starting low priority kernel worker thread s board late initialize nx start application starting init task system bin init load absmodule loading system bin init elf loadbinary loading file system bin init elf init filename system bin init loadinfo 0x4040c638 elf read read 64 bytes from offset 0 elf dumploadinfo load info elf dumploadinfo textalloc 00000000 elf dumploadinfo dataalloc 00000000 elf dumploadinfo textsize 0 elf dumploadinfo datasize 0 elf dumploadinfo textalign 0 elf dumploadinfo dataalign 0 elf dumploadinfo filelen 3289528 elf dumploadinfo symtabidx 0 elf dumploadinfo strtabidx 0 elf dumploadinfo elf header elf dumploadinfo e ident 7f 45 4c 46 elf dumploadinfo e type 0001 elf dumploadinfo e machine 00f3 elf dumploadinfo e version 00000001 elf dumploadinfo e entry 0000004a elf dumploadinfo e phoff 0 elf dumploadinfo e shoff 3286264 elf dumploadinfo e flags 00000001 elf dumploadinfo e ehsize 64 elf dumploadinfo e phentsize 0 elf dumploadinfo e phnum 0 elf dumploadinfo e shentsize 64 elf dumploadinfo e shnum 51 elf dumploadinfo e shstrndx 50 elf load loadinfo 0x4040c638 elf read read 3264 bytes from offset 3286264 elf loadfile loaded sections elf read read 39900 bytes from offset 64 elf loadfile 1 00000000 c0000000 elf read read 45804 bytes from offset 39968 elf loadfile 3 00009be0 c0009be0 elf read read 9 bytes from offset 85776 elf loadfile 5 00000000 c0014ed0 elf read read 3 bytes from offset 85792 elf loadfile 6 00000000 c0014ee0 elf read read 3 bytes from offset 85800 elf loadfile 7 00000000 c0014ee8 elf read read 2 bytes from offset 85808 elf loadfile 8 00000000 c0014ef0 elf read read 2 bytes from offset 85816 elf read read 24 bytes from offset 1313160 elf symvalue other 00005c88 c0000000 c0005c88 elf read read 24 bytes from offset 1313352 elf symvalue other 00005c82 c0000000 c0005c82 elf read read 24 bytes from offset 1313376 elf symvalue other 00005c72 c0000000 c0005c72 elf read read 24 bytes from offset 1313400 elf symvalue other 00005c60 c0000000 c0005c60 elf read read 24 bytes from offset 1313424 elf symvalue other 00005c78 c0000000 c0005c78 elf read read 24 bytes from offset 1313448 elf symvalue other 00005c66 c0000000 c0005c66 elf read read 24 bytes from offset 1313472 elf symvalue other 00005c6c c0000000 c0005c6c elf read read 24 bytes from offset 1313496 elf symvalue other 00005d70 c0000000 c0005d70 elf read read 24 bytes from offset 1312896 elf symvalue other 000019d0 c0009be0 c000b5b0 elf read read 24 bytes from offset 1313232 elf symvalue other 00005d5a c0000000 c0005d5a elf read read 24 bytes from offset 1313520 elf symvalue other 00005cf8 c0000000 c0005cf8 elf read read 24 bytes from offset 1313544 elf symvalue other 00005d76 c0000000 c0005d76 elf read read 24 bytes from offset 1313568 elf symvalue other 00005d4c c0000000 c0005d4c elf read read 24 bytes from offset 1313592 elf symvalue other 00005d52 c0000000 c0005d52 elf read read 24 bytes from offset 1313616 elf symvalue other 00005d56 c0000000 c0005d56 elf read read 24 bytes from offset 1961968 elf read read 24 bytes from offset 1781688 elf symvalue other 00000000 c0101028 c0101028 up relocateadd riscv 64 at c0101028 00000000 to sym 0x4040a850 st value c0101028 load absmodule successfully loaded module system bin init binfmt dumpmodule module binfmt dumpmodule entrypt 0xc000004a binfmt dumpmodule mapped 0 size 0 binfmt dumpmodule alloc 0 0 0 binfmt dumpmodule addrenv 0x40409f60 binfmt dumpmodule stacksize 2048 binfmt dumpmodule unload 0 exec module executing system bin init binfmt copyargv args 0 argsize 0 binfmt copyargv args 2 argsize 23 exec module initialize the user heap heapsize 528384 nx start application ret 3 up exit tcb 0x404088d0 exiting nx start cpu0 beginning idle loop nuttx qemu binary loader log text elf symvalue other 00005d76 c0000000 c0005d76 elf read read 24 bytes from offset 1302760 elf symvalue other 00005d4c c0000000 c0005d4c elf read read 24 bytes from offset 1302784 elf symvalue other 00005d52 c0000000 c0005d52 elf read read 24 bytes from offset 1302808 elf symvalue other 00005d56 c0000000 c0005d56 elf read read 24 bytes from offset 1951160 elf read read 24 bytes from offset 1770880 elf symvalue other 00000000 c0101028 c0101028 up relocateadd riscv 64 at c0101028 00000000 to sym 0x8020a850 st value c0101028 load absmodule successfully loaded module system bin init binfmt dumpmodule module binfmt dumpmodule entrypt 0xc000004a binfmt dumpmodule mapped 0 size 0 binfmt dumpmodule alloc 0 0 0 binfmt dumpmodule addrenv 0x80209f60 binfmt dumpmodule stacksize 2048 binfmt dumpmodule unload 0 exec module executing system bin init binfmt copyargv args 0 argsize 0 binfmt copyargv args 2 argsize 23 exec module initialize the user heap heapsize 528384 up exit tcb 0x802088d0 exiting nuttshell nsh nuttx 12 0 3 nsh nx start cpu0 beginning idle loop nuttx star64 memory management log text mm free freeing 0x4040aa10 mm free freeing 0x4040a9d0 mm free freeing 0x4040a990 mm free freeing 0x4040a950 mm free freeing 0x4040a890 mm malloc allocated 0x4040c810 size 6160 mm malloc allocated 0x4040a890 size 64 mm free freeing 0x4040c810 mm free freeing 0x4040a890 mm free freeing 0x40409290 mm free freeing 0x40409fa0 mm free freeing 0x40409250 mm malloc allocated 0x40409250 size 368 mm malloc allocated 0x404093c0 size 64 mm initialize heap name null start 0xc0200000 size 528384 mm addregion null region 1 base 0xc0200298 size 527712 mm malloc allocated 0x4040a890 size 3088 mm malloc allocated 0x4040b4a0 size 304 mm malloc allocated 0x4040b5d0 size 32 mm malloc allocated 0xc02002c0 size 624 mm malloc allocated 0xc0200530 size 32 mm malloc allocated 0xc0200550 size 32 mm malloc allocated 0xc0200570 size 32 mm malloc allocated 0x4040b5f0 size 32 mm malloc allocated 0x4040b610 size 160 mm malloc allocated 0xc0200590 size 19472 mm free freeing 0x404093c0 nx start application ret 3 mm free freeing 0x40408b90 mm free freeing 0x40408e80 mm free freeing 0x40408e60 mm free freeing 0x40408e40 mm free freeing 0x40408e20 mm free freeing 0x40408e00 mm free freeing 0x40408b70 mm free freeing 0x40408a40 up exit tcb 0x404088d0 exiting mm free freeing 0x4040c000 mm free freeing 0x404088d0 mm malloc allocated 0xc0200590 size 848 nx start cpu0 beginning idle loop nuttx qemu memory management log text mm free freeing 0x8020aa80 mm free freeing 0x8020aa40 mm free freeing 0x8020a9c0 mm free freeing 0x8020a980 mm free freeing 0x8020a940 mm free freeing 0x8020a900 mm free freeing 0x8020a840 mm malloc allocated 0x8020c810 size 6160 mm malloc allocated 0x8020a840 size 64 mm free freeing 0x8020c810 mm free freeing 0x8020a840 mm free freeing 0x80209290 mm free freeing 0x8020a810 mm free freeing 0x80209250 mm malloc allocated 0x80209250 size 368 mm malloc allocated 0x802093c0 size 64 mm initialize heap name null start 0xc0200000 size 528384 mm addregion null region 1 base 0xc0200298 size 527712 mm malloc allocated 0x8020a810 size 3088 mm malloc allocated 0x80209400 size 304 mm malloc allocated 0x80209fe0 size 32 mm malloc allocated 0xc02002c0 size 624 mm malloc allocated 0xc0200530 size 32 mm malloc allocated 0xc0200550 size 32 mm malloc allocated 0xc0200570 size 32 mm malloc allocated 0x80209530 size 32 mm malloc allocated 0x80209550 size 160 mm malloc allocated 0xc0200590 size 19472 mm free freeing 0x802093c0 mm free freeing 0x80208b90 mm free freeing 0x80208e80 mm free freeing 0x80208e60 mm free freeing 0x80208e40 mm free freeing 0x80208e20 mm free freeing 0x80208e00 mm free freeing 0x80208b70 mm free freeing 0x80208a40 up exit tcb 0x802088d0 exiting mm free freeing 0x8020c000 mm free freeing 0x802088d0 nuttshell nsh nuttx 12 0 3 nsh nx start cpu0 beginning idle loop nuttx star64 nsh assertion log no console output text clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123067dfhbcinx start entry uart register registering dev console uart register registering dev ttys0 work start lowpri starting low priority kernel worker thread s board late initialize nx start application starting init task system bin init elf symname symbol has no name elf symvalue shn undef failed to get symbol name 3 elf relocateadd section 2 reloc 1 undefined symbol 0 has no name 3 nx start application ret 3 up exit tcb 0x404088d0 exiting assert current version nuttx 12 0 3 46c1a0f jul 27 2023 19 31 45 risc v assert assertion failed bool 0 at file nsh main c 54 task system bin init 0xc000001a up dump register epc 000000004020fffc up dump register a0 0000000040401610 a1 0000000000000036 a2 00000000c0000e58 a3 0000000000000000 up dump register a4 0000000000000000 a5 0000000000000000 a6 0000000000000036 a7 00000000c0000e68 up dump register t0 0000000040211e9e t1 00000000c000042c t2 0000000000000000 t3 0000000000000000 up dump register t4 0000000000000000 t5 0000000000000000 t6 0000000000000000 up dump register s0 0000000000000000 s1 0000000040409a60 s2 0000000040401748 s3 00000000c0000e58 up dump register s4 00000000c0000e68 s5 0000000000000036 s6 0000000000000000 s7 0000000000000000 up dump register s8 0000000000000000 s9 0000000000000000 s10 0000000000000000 s11 0000000000000000 up dump register sp 000000004040b1d8 fp 0000000000000000 tp 0000000000000000 ra 000000004020fffc dump stack kernel stack dump stack base 0x4040a810 dump stack size 00003072 dump stack sp 0x4040b1d8 stack dump 0x4040b1c0 40409a60 00000000 00000000 00000000 4021021c 00000000 40406cf8 00000000 stack dump 0x4040b1e0 00000219 00010000 c00003ee 00000000 00000000 00000000 4020029a 00000000 stack dump 0x4040b200 7474754e 00000058 c000080e 00000000 c0202b90 00000000 ffffff83 ffffffff stack dump 0x4040b220 00000000 00000000 402126ce 00000000 c000042c 2e323100 00332e30 00000000 stack dump 0x4040b240 c02003d8 00000000 363403d0 30613163 754a2066 3732206c 32303220 39312033 stack dump 0x4040b260 3a31333a 00003534 00000000 00000000 00007fff 00000000 00000001 73697200 stack dump 0x4040b280 00762d63 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x4040b2a0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x4040b2c0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x4040b2e0 40211eb0 00000000 00000000 00000000 402086f4 00000000 c000007c 00000000 stack dump 0x4040b300 00040020 00000002 402086dc 00000000 c000007c 00000000 4040b308 00000000 stack dump 0x4040b320 00000000 00000000 00000000 00000000 402126ce 00000000 c000042c 00000000 stack dump 0x4040b340 00000000 00000000 00000000 00000000 00000000 00000000 00000001 00000000 stack dump 0x4040b360 c0000e68 00000000 00000036 00000000 c0000e58 00000000 00000000 00000000 stack dump 0x4040b380 c0000e58 00000000 00000036 00000000 c0000e68 00000000 00000000 00000000 stack dump 0x4040b3a0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x4040b3c0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x4040b3e0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 up exit tcb 0x40409a60 exiting nx start cpu0 beginning idle loop nuttx qemu nsh assertion log console output ok text abcnx start entry uart register registering dev console uart register registering dev ttys0 work start lowpri starting low priority kernel worker thread s board late initialize nx start application starting init task system bin init elf symname symbol has no name elf symvalue shn undef failed to get symbol name 3 elf relocateadd section 2 reloc 1 undefined symbol 0 has no name 3 up exit tcb 0x802088d0 exiting main assert current version nuttx 12 0 3 3c99d2b dirty jul 27 2023 19 27 52 risc v assert assertion failed bool 0 at file nsh main c 54 task system bin init 0xc000001a up dump register epc 0000000080001e82 up dump register a0 0000000080200f10 a1 0000000000000036 a2 00000000c0000e58 a3 0000000000000000 up dump register a4 0000000000000000 a5 0000000000000000 a6 0000000000000036 a7 00000000c0000e68 up dump register t0 0000000080006d36 t1 00000000c000042c t2 0000000000000000 t3 0000000000000000 up dump register t4 0000000000000000 t5 0000000000000000 t6 0000000000000000 up dump register s0 0000000000000000 s1 0000000080209a60 s2 0000000080201750 s3 00000000c0000e58 up dump register s4 00000000c0000e68 s5 0000000000000036 s6 0000000000000000 s7 0000000000000000 up dump register s8 0000000000000000 s9 0000000000000000 s10 0000000000000000 s11 0000000000000000 up dump register sp 000000008020b1d8 fp 0000000000000000 tp 0000000000000000 ra 0000000080001e82 dump stack kernel stack dump stack base 0x8020a810 dump stack size 00003072 dump stack sp 0x8020b1d8 stack dump 0x8020b1c0 80209a60 00000000 00000000 00000000 800020a2 00000000 80206cf8 00000000 stack dump 0x8020b1e0 00000219 00010000 c00003ee 00000000 00000000 00000000 80000592 00000000 stack dump 0x8020b200 7474754e 00000058 c000080e 00000000 c0202b90 00000000 c0200430 00000000 stack dump 0x8020b220 00000000 00000000 80007566 00000000 c000042c 2e323100 00332e30 00000000 stack dump 0x8020b240 c02003d8 00000000 633303d0 32643939 69642d62 20797472 206c754a 32203732 stack dump 0x8020b260 20333230 323a3931 32353a37 00000000 00007fff 00000000 00000001 73697200 stack dump 0x8020b280 00762d63 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x8020b2a0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x8020b2c0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x8020b2e0 80006d48 00000000 00000000 00000000 80001264 00000000 c000007c 00000000 stack dump 0x8020b300 00040020 00000002 8000124c 00000000 c000007c 00000000 8020b308 00000000 stack dump 0x8020b320 00000000 00000000 00000000 00000000 80007566 00000000 c000042c 00000000 stack dump 0x8020b340 00000000 00000000 00000000 00000000 00000000 00000000 00000001 00000000 stack dump 0x8020b360 c0000e68 00000000 00000036 00000000 c0000e58 00000000 00000000 00000000 stack dump 0x8020b380 c0000e58 00000000 00000036 00000000 c0000e68 00000000 00000000 00000000 stack dump 0x8020b3a0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x8020b3c0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 stack dump 0x8020b3e0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 up exit tcb 0x80209a60 exiting nx start cpu0 beginning idle loop nuttx star64 console output log console output is stuck text clk u5 dw i2c clk core already disabled clk u5 dw i2c clk apb already disabled 123067dfhbcinx start entry uart register registering dev console uart register registering dev ttys0 work start lowpri starting low priority kernel worker thread s board late initialize nx start application starting init task system bin init elf symname symbol has no name elf symvalue shn undef failed to get symbol name 3 elf relocateadd section 2 reloc 2 undefined symbol 0 has no name 3 nx start application ret 3 up exit tcb 0x404088d0 exiting uart write 0xc0200428 0000 2a 2a 2a 6d 61 69 6e 0a main uart write 0xc000a610 0000 0a 4e 75 74 74 53 68 65 6c 6c 20 28 4e 53 48 29 nuttshell nsh 0010 20 4e 75 74 74 58 2d 31 32 2e 30 2e 33 0a nuttx 12 0 3 uart write 0xc0015340 0000 6e 73 68 3e 20 nsh uart write 0xc0015318 0000 1b 5b 4b k nx start cpu0 beginning idle loop | nuttx riscv riscv64 star64 jh7110 | os |
DatabaseInflux-Application | databaseinflux application database service for application of iiot graduation work of the control and automation engineering course universidade estadual paulista j lio de mesquita filho primeiros passos instala o da biblioteca influx para o funcionamento do servi o de escrita no banco de dados npm install influx express a l gica e recursos utilizados est o no arquivo u influx service u dentro do diret rio principal o c digo main encontra se devidamente comentado resumo da aplica o o servi o denominado u influx service u o responsav l por consumir dados do microservi o u api service u os dados s o consumidos via protocolo http atrav s de rotas espec ficas das a es do microservi o u daq service u os dados ent o s o escritos por meio de regras no banco de dados relacional influxdb tanto o servi o u influx service u quanto o banco influxdb est o instalados localmente na raspberry 4 a escrita dos dados est o classificadas em 3 medi es distintas no mesmo banco de daos s o elas 1 medi es das vari veis de processos s o vari veis oriundas dos sensores essas v riaveis est o dispon veis na response de duas distintas rotas s o os sensores press o do reservat rio em inox press o de linha n vel do tanque de acr lico vaz o de linha e a temperatura as 4 primeiras s o valores apartir do input de corrente obtidas pela a o riin do u daq service u o sensor de temperatura n o possui input por corrente e ent o essa vari vel de processos a sua sa da de tens o obtido pela a o ruin 2 medi es das vari v is de controle as variaveis de controle s o 3 o input sendo o setpoint e as sa das sendo vari vel de processo e a vari vel manipulada inicialmente os testes est o sendo realizados na malha 1 de press o de linha pretende se obter as variaveis de de diferentes malhas implementar 3 medi es das vari veis manipuladas essas s o as sa das dos tr s atuadores presentes na planta as bombas 1 2 e a v lvula atualmente n o est sendo poss vel obter essas vari veis pois foi constatado que necess rio modificar a a o wuout como sendo um met do get est como post observa o a parte que faz o monitoramento em si com as vis es e os dash est o documentado a parte obrigado felipe | server |
|
openNLP | opennlp this is a very simple and easy java based nlp guide for quick start to nlp model creation and use for entity extraction nlp model creation and use br below steps are for opennlp model creation training the model with simple training set and then using the same trained model from entity extraction br ul li opennlp custom model creation using annotated training set br example for annotated training text br the highest temperature recorded in code lt start location gt delhi lt end gt code before this was 47 4 degree celsius at palam on june 16 1995 br here location is the key and the delhi is the annotated sample value for it so next time when an input document finds delhi then using the above trained model you can extracts entity as delhi location means delhi is a location li li recieves input for entity extraction li tokenize the input text fragment using pre tained tokenizer model provided by opennlp li li pass the token array and newly created model for entity extraction li return the extracted key value pair li ul br go through the code and you will understand every thing this code can be used to create any kind of simple trained model but the precision depends on the more you train the more the entity extraction becomes accurate using the code br in order to use opennlp in your project you must define below maven dependency of opennlp tools pre code lt dependency gt lt groupid gt org apache opennlp lt groupid gt lt artifactid gt opennlp tools lt artifactid gt lt version gt 1 5 3 lt version gt lt dependency gt code pre | ai |
|
codeassistant | codeassistant codeassistant is toolinf which automates interactions with the openai completions api https platform openai com docs api reference completions and the vertex ai predict api https cloud google com vertex ai docs predictions get predictions prompts are organized in a directory or prompts library as yaml configuration files with documentation implemented in markdown an example of such a library can be found here https github com spandigital prompts library we are looking for contributors please see how you can contribute contributing md and our code of conduct code of conduct md it fulfills these purposes a tool for prompt engineers to prototype prompts and rapidly iterate on them the ability to parameterize prompts with light templating in the handling of input allows prompts to be integrated with other software such as shell scripts provides a web ui it has two main modes of operation cli suitable for shell scripts output of prompts can be redirected from stdout webui useful for testing prompts openai configuration you will need to configure an openai api key before usage sample configuration it is recommended you set up codeassistant with a config file at home codeassistant yaml for default values yaml backend openai openaiapikey api key openaiuserid your email address promptslibrarydir directory to load prompts defaults to home prompts library vertexai configuration you will need to install the gcloud sdk before using vertexai you will need a project on google cloud which gives your user access to vertex ai you need to login with gcloud auth login before using sample configuration yaml backend vertexai vertexaiprojectid project id vertexailocation us central1 vertexaimodel text bison 001 promptslibrarydir directory to load prompts defaults to home prompts library additional configuration more keys are available for debugging yaml debug configuration first response time last response time request header request time request tokens response header sent prompt webserver installing and running via docker bash docker run rm name codeassistant volume home codeassistant yaml codeassistant yaml ro volume home prompts library prompts library ro p8989 8989 ghcr io spandigital codeassistant latest serve in this example codeassistant yaml is home codeassistant yaml and prompts library and the prompts library folder is in home prompts library on the docker container home is defined as installing an running via macos x initial installation bash brew tap spandigital homebrew tap brew install codeassistant upgrades bash brew up brew reinstall codeassistant usage run web front end bash codeassistant serve or to override the default model bash codeassistant serve openaicompletionsmodel gpt 4 list all the commands in your prompt libraries bash codeassistant list list commands for a specific prompt library bash codeassistant run library command var1 value vae2 value or to override the default model bash codeassistant run library command var1 value vae2 value openaimodel gpt 4 list available models beta bash codeassistant list models this readme md file is documentation spdx license identifier mit | chatgpt chatgpt35-turbo llm openai vertexai | cloud |
llm | llm interfacing with large language models remote and local from lean | ai |
|
bitquest | bitquest a minecraft mod that connects the game economics to a bitcoin or other cryptocurrency nodes it creates a bitcoin wallet for every user that connects to the server plus a common loot wallet used for rewards to players when killing mobs players also can purchase land plots and stacks of items transferring coins to the loot wallet thus redistributing the spent cryptocurrency within the players you can use bitquest to host your own minecraft crypto server important note this project is an experiment and not a commercial product bugs can and most likely will happen please report any bugs to a moderator promptly to ensure they are fixed also note that your wallet is not guaranteed and you may experience issues with your balance for this reason it is highly recommended that you do not deposit large amounts or anything you do not wish to place at risk by being tied to the server in addition if you are caught breaking rules and are banned you forfeit your access to your server wallet and all funds tied to it with this said rules are non negotiable and will be strictly enforced this server is a fair server and anyone abusing any system set in place will be punished please play fair have fun and enjoy the server features bitcoin wallet the bitquest https bitquest co server and every player has a bitcoin address any player can receive and send bitcoin to any address inside or outside the game this is useful for buying materials selling crafts trading tipping etc a player just joined the server http i imgur com 1a6wkab png the player can see it s bitcoin balance http i imgur com 5g5pbxb png loot every time a player kills an enemy mob there is a chance to get loot if that is the case the server makes a transaction directly from the server address to the player address a player got loot http i imgur com cxqxmt2 png player to player transactions you can send bitcoin to an external wallet with transfer transfer amount recipient bitcoin address player using transfer command http i imgur com vlf9c1f png player notification http i imgur com phmomos png player s public transaction http i imgur com jpo4axt png additionally players can send bitcoin to other players via send send amount username play bitquest official bitquest server is not online anymore but you can host your own server using docker or bukkit hosting a bitquest server there are two methods to create a bitquest server one involves running a docker image with everything ready and the other is to build the plugin from source and adding it to a spigot instance hosting a bitcoin or dogecoin node a requirement for bitquest is a full node of bitcoin core or dogecoin core before starting a bitquest server make sure you have a fully synched node with rpc access turned on using docker you can download the a https hub docker com repository docker explodi bitquest official bitquest docker image this image builds a bukkit server with the latest bitquest version plugin installed you must also have a node running and the connection info rpc login host port set in the environment variables see configuration building the bitquest java plugin you can build the bitquest java plugin that you can drop in to a bukkit server this will enable all bitquest features on your server 1 requirements 1 java jre sdk version 1 8 2 maven 2 compile bitquest and generate a jar file make b jar this will create a bitquest jar in the target folder contributing before submitting a pull request please format the code using checkstyle to run checkstyle and check if there are warnings make b lint running a bitquest server with docker tou can use docker to run a bitquest server there s also an official bitquest docker image https hub docker com r explodi bitquest the recommended way to configure the image is using a docker compose yml file that can link to a directory where the worlds are stored an example is included here configuration before running the server the following environment variables must be set environment variable description bitquest admin uuid minecraft user id for the root user bitquest env set to production for a public server bitquest name the name of your server bitquest node host host of the node bitquest node port port of the node bitquest node rpc user node rpc username bitquest node rpc password node rpc password more info https bitquest co | blockchain |
|
Hospital-Management-System | hospital management system this is the laboratory mini project of the database management system laboratory course of department of computer science and engineering iit kharagpur for the spring semester 2022 23 backend the backend is written in python using the flask framework the database used is postgresql generate the requirements txt file using the following command pip install pipreqs pipreqs force install the requirements using the following command pip install r requirements txt install postgresql | server |
|
blockchain_go_videos | golang 1 by jeiwan https jeiwan cc by liuchengxu https github com liuchengxu blockchain tutorial 2 http edu kongyixueyuan com course 3 http edu kongyixueyuan com course 3 3 1 2 3 4 5 hashcash 6 7 boltdb 8 9 10 11 cli 12 13 14 15 16 17 18 19 20 21 22 23 base58 24 25 26 27 28 utxo 29 merkle 30 p2pkh 31 32 33 getblocks 34 getdata 35 block tx 36 37 p2p 38 39 40 41 javascript 42 43 44 api 4 qq 263270946 http liyuechun com 5 | blockchain publicchain utxo bitcoin privatekey | blockchain |
dlnlp2019 | cpsc 532p ling 530a deep learning for natural language processing dl nlp the university of british columbia year winter session i 2019 time tue thu 14 00 15 30 location the leon and thea koerner university centre ucll right by rose garden at 6331 crescent road v6t 1z1 room 109 instructor dr muhammad abdul mageed office location totem field studios 224 department of linguistics 2613 west mall v6t 1z4 office phone apologies i do not use office phone please email me office hours tue 12 00 14 00pm totem field studios 224 or by appointment i can also handle inquiries via email or in limited cases skype e mail address muhammad mageed ubc ca student portal http canvas ubc ca 1 course rationale goal rationale background deep learning is a class of machine learning methods inspired by information processing in the human brain whereas natural language processing nlp is the field focused at teaching computers to understand and generate human language emotion detection where a program is able to identify the type of expressed emotion from language is an example of language understanding dialog systems where the computer interacts with humans such as the amazon echo constitute an instance of both language understanding and generation as the machine identifies the meaning of questions and generates meaningful answers other examples of nlp include speech processing and machine translation deep learning of natural language is transformative and has recently broken records on several nlp tasks the field is also in its infancy with fascinating future breakthroughs ahead solving nlp problems directly contributes to the development of pervasive technologies with significant social and economic impacts and the potential to enhance the lives of millions of people given the central role that language plays in our lives this research has implications across almost all fields of science and technology as well as other disciplines as nlp and deep learning are instrumental for making sense of the ever growing data collected in these fields goal tthis course provides a graduate level introduction to deep learning with a focus on nlp problems and applications the goal of the course is to familiarize students with the major deep learning methods and practices this includes for example how neural networks are trained the core neural network architectures and the primary deep learning methods being developed to solve language problems this includes problems at various linguistic levels e g word and sub word phrase clause and discourse for example we will cover unsupervised distributed representations and supervised deep learning methods across these different linguistic levels through homework and a final project the course also provides a context for hands on experience in using deep learning software to develop advanced solutions for nlp problems potential audiences for this course are people with a linguistics computer science and or engineering background interested in learning novel deep learning and nlp methods people with other machine learning backgrounds interested in deep learning and or nlp 2 course objectives upon completion of this course students will be able to identify the core principles of training and designing artificial neural networks identify the inherent ambiguity in natural language and appreciate challenges associated with teaching machines to understand and generate it become aware of the major deep learning methods being developed for solving nlp problems and be in a position to apply this deepened understanding in critical creative and novel ways become aware of a core of nlp problems and demonstrate how these are relevant to the lives of diverse individuals communities and organizations collaborate effectively with peers through course assignments identify an nlp problem existing or novel and apply deep learning methods to develop a novel solution for it 3 course topics word phrase and sentence meaning feedforward networks recurrent neural networks convolutional neural networks language models seq2seq models attention transformers deep generative models auo encoders generative adversarial networks applications machine translation controlled language generation summarization image and video captioning morphosyntax e g pos tagging and morphological disambiguation text classification e g sentiment analysis emotion detection language 4 prerequisites familiarity with basic linear algebra basic calculus and basic probability basic high school level have programming experience in python familiarity with at least one area of linguistics have access to a computer with a gpu on a regular basis ability to work individually as well as with team students lacking any of the above pre requisites must be open to learn outside their comfort zone to make up including investing time outside class learning these pre requisites on their own some relevant material across these pre requisites will be linked from the syllabus although very light support might be provided the engineering is exclusively the students responsibility this course has no lab section should you have questions about pre requisites please email the instructor 5 format of the course this course will involve lectures class hands on activities individual and group work and instructor peer and self assessment 6 course syllabus recommended books goodfellow i bengio y courville a bengio y 2016 deep learning vol 1 cambridge mit press available at link http www deeplearningbook org jurafsky d martin j h 2017 speech and language processing london pearson available at link https web stanford edu jurafsky slp3 ed3book pdf other related material bird s klein e loper e 2009 natural language processing with python o reilly media inc link http www nltk org book weekly readings will be assigned from materials available through the ubc library and online see readings section below 7 calendar weekly schedule tentative date slides related content what is due out tues sept 3 no class ta training na thurs sept 5 course overview overview slides https github com ubc nlp dlnlp2019 blob master slides intro deeplearning pdf tues sept 10 probability i prob slides https github com ubc nlp dlnlp2019 blob master slides probability pdf dlb ch03 https www deeplearningbook org contents prob html ka https www khanacademy org math statistics probability probability probability geometry harvard stats https www youtube com playlist list pl2sou6wwxb0uwwh80ktq6ht66kwxbztio thurs sept 12 probability ii prob slides https github com ubc nlp dlnlp2019 blob master slides probability pdf hw01 out canvas tues sept 17 probability iii prob slides https github com ubc nlp dlnlp2019 blob master slides probability pdf thurs sept 19 information theory info theory slides https github com ubc nlp dlnlp2019 tree master slides information theory pdf entropy basics slides https github com ubc nlp dlnlp2019 tree master slides entropy background pdf tues sept 24 ml basics ml basics slides https github com ubc nlp dlnlp2019 tree master slides ml basics pdf thurs sept 26 word meaning i word meaning slides https github com ubc nlp dlnlp2019 tree master slides word meaning pdf hw01 due hw02 out tues oct 1 word meaning ii project discussion word meaning slides https github com ubc nlp dlnlp2019 tree master slides word meaning pdf thurs oct 3 linear algebra lin alg notebook https github com ubc nlp deeplearning nlp2018 blob master slides linearalgpresentation ipynb dlb ch02 https www deeplearningbook org contents linear algebra html tues oct 8 language models lang models slides https github com ubc nlp dlnlp2019 tree master slides lang models pdf jm ch03 https web stanford edu jurafsky slp3 3 pdf brown et al 1992 https www aclweb org anthology j92 1002 pdf thurs oct 10 word embeddings word2vec slides https github com ubc nlp dlnlp2019 tree master slides word2vec pdf mikolov et al 2013a https arxiv org pdf 1301 3781 pdf mikolov et al 2013b https www aclweb org anthology n13 1090 pdf bojanowski et al 2017 https www mitpressjournals org doi pdf 10 1162 tacl a 00051 tues oct 15 feedforward networks ff slides https github com ubc nlp dlnlp2019 tree master slides feedforward nets pdf dlb ch06 https www deeplearningbook org contents mlp html thurs oct 17 recurrent neural networks rnn slides https github com ubc nlp dlnlp2019 tree master slides rnn pdf dlb ch10 https www deeplearningbook org contents rnn html tues oct 22 rnns ii rnn slides https github com ubc nlp dlnlp2019 tree master slides rnn pdf thurs oct 24 grus lstms gru lstm slides https github com ubc nlp dlnlp2019 tree master slides gru lstm pdf chung et al 2014 empirical eval gru https arxiv org pdf 1412 3555 pdf hw02 due tues oct 29 applications applications slides https github com ubc nlp dlnlp2019 tree master slides applications pdf thurs oct 31 generation neural fake news neural fake news slides https github com ubc nlp dlnlp2019 tree master slides neural fake news pdf tues nov 5 gradient based optimization optimization slides https github com ubc nlp dlnlp2019 tree master slides optimization pdf hw03 a due thurs nov 7 backpropagation backpropagation slides https github com ubc nlp dlnlp2019 tree master slides backpropagation pdf tues nov 12 seq2seq neural machine translation attention mt slides https github com ubc nlp dlnlp2019 tree master slides attention pdf bahdanau et al 2016 https arxiv org pdf 1409 0473 pdf thurs nov 14 transformer i transformer slides https github com ubc nlp dlnlp2019 tree master slides transformer pdf vaswani et al 2017 https papers nips cc paper 7181 attention is all you need pdf devlin et al 2019 https www aclweb org anthology n19 1423 pdf tues nov 19 transformer ii bert same as last week thurs nov 21 convnets cnn slides https github com ubc nlp dlnlp2019 tree master slides cnns pdf dlb ch09 https www deeplearningbook org contents convnets html tues nov 26 auto encoders gans multi task learning and word mapping methods overview slides https github com ubc nlp dlnlp2019 tree master slides multiple methods pdf variational autoencoders slides https github com ubc nlp dlnlp2019 tree master slides variational autoencoders pdf dlb ch20 10 3 https www deeplearningbook org contents generative models html semi supervised sequence learning www cs ubc ca amuham01 ling530 papers dai2015semi pdf dianet https arxiv org pdf 1910 14243 pdf word translation without parallel data https arxiv org pdf 1710 04087 pdf improving neural machine translation mod els with monolingual data https www aclweb org anthology p16 1009 pdf thurs nov 28 projects tues dec 3 final project due hw03 b 8 readings see section 7 above additionally below is list of relevant interesting background papers this list will grow soon where to find good papers acl anthology https www aclweb org anthology neurips 2019 papers https nips cc conferences 2019 acceptedpapersinitial neurips 2018 proceedings http papers nips cc book advances in neural information processing systems 31 2018 iclr 2019 https iclr cc conferences 2019 schedule type poster iclr 2018 https dblp org db conf iclr iclr2018 aaai digital library https www aaai org library conferences library php attention learning to deceive with attention based explanations https arxiv org pdf 1909 07913 pdf what does bert look at an analysis of bert s attention https arxiv org pdf 1906 04341 pdf analyzing the structure of attention in a transformer language model https arxiv org pdf 1906 04284 pdf is attention interpretable https arxiv org pdf 1906 03731 pdf graph attention networks https arxiv org pdf 1710 10903 pdf attention is not explanation https www aclweb org anthology n19 1357 pdf mt towards understanding neural machine translation with word importance https arxiv org pdf 1909 00326 pdf an exploration of placeholding in neural machine translation https www aclweb org anthology w19 6618 bleu a method for automatic evaluation of machine translation https www aclweb org anthology p02 1040 learning phrase representations using rnn encoder decoder for statistical machine translation https arxiv org pdf 1406 1078 pdf semi supervised learning for neural machine translation https arxiv org pdf 1606 04596 pdf self supervised neural machine translation https www aclweb org anthology p19 1178 mtl cross lingual dependency parsing with unlabeled auxiliary languages https arxiv org pdf 1909 09265 pdf word mapping various topics toward controlled generation of text http www cs ubc ca amuham01 ling530 papers hu2017toward pdf tutorial on variational autoencoders http www cs ubc ca amuham01 ling530 papers doersch2016tutorial pdf adversarially regularized autoencoders http www cs ubc ca amuham01 ling530 papers zhao2018adversarially pdf joint embedding of words and labels for text classification http www cs ubc ca amuham01 ling530 papers wang2018joint pdf learning adversarial networks for semi supervised text classification via policy gradient http www cs ubc ca amuham01 ling530 papers li2018learning pdf realistic evaluation of semi supervised learning algorithms http www cs ubc ca amuham01 ling530 papers oliver2018realistic pdf improving language understanding by generative pre training http www cs ubc ca amuham01 ling530 papers radford2018improving pdf automatic stance detection using end to end memory networks http www cs ubc ca amuham01 ling530 papers mohtarami2018automatic pdf neural machine translation by jointly learning to align and translate http www cs ubc ca amuham01 ling530 papers bahdanau2014neural pdf grammar as a foreign language http www cs ubc ca amuham01 ling530 papers vinyals2015grammar pdf deep models for arabic dialect identification on benchmarked data http www cs ubc ca amuham01 ling530 papers elarabydeepmodels2018 pdf a neural model for user geolocation and lexical dialectology http www cs ubc ca amuham01 ling530 papers rahimigeoloc2017 pdf deep contextualized word representations http www cs ubc ca amuham01 ling530 papers peterselmo2018 pdf emonet fine grained emotion detection with gated recurrent neural networks http www cs ubc ca amuham01 ling530 papers mageedemonet2017 pdf is statistical machine translation approach dead http www cs ubc ca amuham01 ling530 papers menacer2017statistical pdf neural machine translation and sequence to sequence models a tutorial http www cs ubc ca amuham01 ling530 papers neubig2017neural pdf adversarial training methods for semi supervised text classification http www cs ubc ca amuham01 ling530 papers miyato2016adversarial pdf learned in translation contextualized word vectors http www cs ubc ca amuham01 ling530 papers mccann2017learned pdf semi supervised sequence learning http www cs ubc ca amuham01 ling530 papers dai2015semi pdf auto encoding variational bayes http www cs ubc ca amuham01 ling530 papers kingma2013auto pdf sentiment transfer using seq2seq adversarial autoencoders http www cs ubc ca amuham01 ling530 papers singh2018sentiment pdf variational autoencoder for semi supervised text classification http www cs ubc ca amuham01 ling530 papers xu2017variational pdf phrase based neural unsupervised machine translation http www cs ubc ca amuham01 ling530 papers lample2018phrase pdf asma a system for automatic segmentation and morpho syntactic disambiguation of modern standard arabic http www aclweb org anthology r13 1001 9 course assignments grades assignment due date weight professionalization class participation throughout 15 assignment 1 individual assignment word embeddings oct 3 15 assignment 2 individual assignment text classification with rnns oct 24 15 assignment 3 a group assignment project proposal nov 5 5 assignment 3 b group assignment term project group of 3 dec 3 50 notes on assignments assignment 1 word embeddings in this assignment students will train a word embeddings model using either word2vec of fasttext on a dataset provided to them and use the trained model for a number of tasks the students will write a report using the jupyter platform describing their work the reprot will include both the code used and the results acquired in a step wise organized fashion the students are expected to use enabling python libraries e g nltk gensim scikit learn and illustrate their work with visualizations automatically generated from the data a rubric will be provided to walk students through the different steps deliverables jupyter notebook describing the work students carried out assignment 2 text classification with rnns for this assignment students will build a fully fledged text classifier using rnns and its variations e g lstms grus for this the students will be provided a labeled dataset as such the task is cast as supervised machine learning the students will need to demonstrate understanding of the theoritical part of the course for example a detailed description of pre processing data splits concepts like train dev and test sets and or n fold cross validation model capacity e g the architecture of the network used in terms of layers and number of units in each layer activation functions regularization cost functions baselines and meaningful comparisons which baselines are chosen and why etc deliverables a short paper 4 pages main body 2 pages references jupyter notebook students will then write a 4 page report 2 extra pages for references a maximum of 2 extra pages can be allowed without instructor permission but need to be justfied in a footnote in the report students will also need to submit an accompanying jupyter notebook with their code students will be provided an acl latex template to use for writing the report and a rubric walking them through some of the major details of how to write the report assignment 3 term project the purposes of this assignment include identifying and describing an interesting i e challenging novel socially relevant has practical applications nlp problem reviewing previous literature on relevant to the task showing a clear understanding of previous scholarship proposing and developing in the engineering sense via code a solution to the problem using deep learning clearly describing the work justifying decisons made in a way that lends work to replication developing oral and written communication skills through discussions with classmates and instructor demonstrating ability to work as part of a team including initiative taking integrity dependability and co operation and effective collaboration for this assignment each student is required to work as part of a group of of 3 on a project involving a practical task example projects will be discussed in class a group of a different size may be possible after consultation with the instructor deliverables proposal 1 2 pages in acl style latex who are the the group members what is the problem you are proposing a solution for what motivates your work why is it important or useful to undertake the chosen task how does your project compare to nlp and deep learning published research what are the different steps you will take to ensure success of the project what are the smaller segments of which the bigger task is composed and how will you conduct each small task how does the work bread down and what each member of the team be contributing timeline for completing the project including goals for each segment note you may like to provide a table breaking down who is doing what and when the latex files will be provided to you as part of the rubric for the final project final paper 6 8 pages acl style the final deliverable includes a detailed and clear description of your project including the necessary sections as appropriate for example you will need to include an abstract introduction possibly research questions a literature review a description of dataset collection splits methods implementation details experimental conditions settings comparisons baselines results in tables analysis of results e g with visulaizations error analyses and a conclusion describing limitations and future directions all data used whenever possible and or links to where the data are housed pointers to a live version of the project if any as appropriate you should situate your work within the wider context of published works and approaches with supporting arguments you will have an unlimited number of pages for references but you should plan to have at least 15 sources employment of figures tables and visualizations as appropriate to enhance argument and facilitate communicating your findings results 10 course policies attendance the ubc calendar states regular attendance is expected of students in all their classes including lectures laboratories tutorials seminars etc students who neglect their academic work and assignments may be excluded from the final examinations students who are unavoidably absent because of illness or disability should report to their instructors on return to classes evaluation all assignments will be marked using the evaluative criteria given in this syllabus access diversity access diversity works with the university to create an inclusive living and learning environment in which all students can thrive the university accommodates students with disabilities who have registered with the access and diversity unit https students ubc ca about student services access diversity you must register with the disability resource centre to be granted special accommodations for any on going conditions religious accommodation the university accommodates students whose religious obligations conflict with attendance submitting assignments or completing scheduled tests and examinations please let your instructor know in advance preferably in the first week of class if you will require any accommodation on these grounds students who plan to be absent for varsity athletics family obligations or other similar commitments cannot assume they will be accommodated and should discuss their commitments with the instructor before the course drop date ubc policy on religious holidays http www universitycounsel ubc ca policies policy65 pdf academic integrity plagiarism plagiarism is the most serious academic offence that a student can commit regardless of whether or not it was committed intentionally plagiarism has serious academic consequences and can result in expulsion from the university plagiarism involves the improper use of somebody else s words or ideas in one s work it is your responsibility to make sure you fully understand what plagiarism is many students who think they understand plagiarism do in fact commit what ubc calls reckless plagiarism below is an excerpt on reckless plagiarism from ubc faculty of arts leaflet plagiarism avoided taking responsibility for your work http www arts ubc ca arts students plagiarism avoided html the bulk of plagiarism falls into this category reckless plagiarism is often the result of careless research poor time management and a lack of confidence in your own ability to think critically examples of reckless plagiarism include taking phrases sentences paragraphs or statistical findings from a variety of sources and piecing them together into an essay piecemeal plagiarism taking the words of another author and failing to note clearly that they are not your own in other words you have not put a direct quotation within quotation marks using statistical findings without acknowledging your source taking another author s idea without your own critical analysis and failing to acknowledge that this idea is not yours paraphrasing i e rewording or rearranging words so that your work resembles but does not copy the original without acknowledging your source using footnotes or material quoted in other sources as if they were the results of your own research and submitting a piece of work with inaccurate text references sloppy footnotes or incomplete source bibliographic information bear in mind that this is only one example of the different forms of plagiarism before preparing for their written assignments students are strongly encouraged to familiarize themselves with the following source on plagiarism the academic integrity resource centre http help library ubc ca researching academic integrity if after reading these materials you still are unsure about how to properly use sources in your work please ask me for clarification students are held responsible for knowing and following all university regulations regarding academic dishonesty if a student does not know how to properly cite a source or what constitutes proper use of a source it is the student s personal responsibility to obtain the needed information and to apply it within university guidelines and policies if evidence of academic dishonesty is found in a course assignment previously submitted work in this course may be reviewed for possible academic dishonesty and grades modified as appropriate ubc policy requires that all suspected cases of academic dishonesty must be forwarded to the dean for possible action | machine-learning deep-learning deeplearning deep-neural-networks natural-language-processing nlp ubc ubc-linguistics ubc-cs ubc-information abdul-mageed | ai |
code-standards | isobar front end development standards and guidelines license all content licensed under creative commons attribution 3 0 unported license summary this document contains guidelines for web applications built by the front end development practice of isobar it is to be readily available to anyone who wishes to check or contribute to the iterative progress of our discipline s best practices this document s primary motivation is two fold 1 code consistency and 2 best practices by maintaining consistency in coding styles and conventions we can ease the burden of legacy code maintenance and mitigate risk of breakage in the future by adhering to best practices we ensure optimized page loading performance and maintainable code we hope to encourage other developers to think about how to best standardize their approaches to development to propose their own ideas for debate and for inclusion in our version of the document and to adapt our standards for their own unique development practices what better way of achieving consensus on how best to develop in our discipline than through feedback from members of that discipline themselves intent for build and content we hope to separate the structure of the document from the content contained in the standards themselves effectively our goal is to be able to easily update the content without having to worry about the structure this also enables pull requests to focus on content and forks to the content to be easily re branded viewing the document to view the latest you can just clone locally bash git clone git github com isobar idev code standards git to make changes using the process in place please use the build process the next few sections describe this build process building the document requirements the build system uses grunt js http gruntjs com via node js http nodejs org and sass http sass lang com via libsass http libsass org first install node js http nodejs org from their web site build details we are using grunt https github com gruntjs to run the assemble https github com assemble assemble task to parse populate variables and combine files for the html markdown and handlebars http handlebarsjs com templates note assemble http assemble io is an exceptionally active and flexible framework for building static html pages it allows the usage of handlebars markdown and html files so we can gradually migrate to markdown content files over time we suggest you check out assemble http assemble io as well the gruntfile grunt js includes the build for the multi lingual copies of the document there is a variable for standards defaultlanguage which will determine what language the default index html is rendered in to start with a clean slate the gruntfile has a cleanup task which will remove the previously generated index html and associated language files there is also a watch task if you like to work that way execute the build run npm install from the command line of the project directory to install all the node dependencies you may need to occasionally re run this command as new dependencies are added windows you may need to manually run npm install g grunt and npm install g grunt cli to correctly set the path variables required to run grunt from the command line run grunt from the command line of the project directory to run the build process structure of page content the html files in the root are generated via grunt and should not be edited directly there is one file per language by language code en html es html ru html finally the standards defaultlanguage setting determines which html file will be copied to the index html file note in the near future the layout and templates will be updated to include the i18l language menus content the content is written in markdown files and the build converts it to html example src content lang css md src content lang general md src content lang html md and so on each of the md files contained within these directories is a portion of the final output file we have separated the different sections that make up the page into individual files so that it is easier to edit including a content file the content files are included as partials and the data and order is defined in the following folder and files src content lang build lang hbs src content lang build data json the data json file has special significance to assemble do not rename this file page layout presentation the main layout is a handlebars file that the content is injected into and language specific attributes are updated the file is src layouts main hbs structure of css the css files are generated via libsass from the scss files located in the scss folder which is run as part of the grunt task deploy because github pages only serve static content you must push your generated files to the gh pages branch for updates to appear online | best-practices isobar javascript css css3 html5 html | front_end |
blockchain-identity | blockchain and identity note also check out decentralized id com https decentralized id com github https github com decentralized id decentralized id github io a website made up of curated lists surrounding decentralized self sovereign and blockchain identity resources identosphere weekly identity highlights https identosphere substack com kaliya identity woman and infominer of decentralized id com stay current on happenings in ssi did https kumu io vijarn markus sabadello and infominer33 on identity landscape https kumu io vijarn markus sabadello and infominer33 on identity landscape visualization of blockchain identity resources projects companies working on blockchain and identity pull requests welcome namecoin http namecoin org is a blockchain that has been conceived from the start to be used for registering domain names it is the first fork of the bitcoin software nameid https nameid org is an openid service based on namecoin identifiers certcoin https courses csail mit edu 6 857 2014 files 19 fromknecht velicann yakoubov certcoin pdf is an mit paper about a namecoin based decentralized authentication system which maintains a public ledger of domains and their associated public keys chainanchor http connection mit edu wp content uploads sites 29 2014 12 anonymous identities for permissioned blockchains2 pdf is mit paper about an architecture that adds an identity and privacy preserving layer above the blockchain either the private blockchain or the public blockchain in bitcoin blockstack https github com blockstack is a network of computers that collectively maintain a global registry of domain names public keys and cryptographic hashes with this registry blockstack serves as a decentralized domain name system dns and a decentralized public key infrastructure pki onename https onename com is a product built on blockstack that allows people to register identities a workshop called rebooting the web of trust http weboftrust info has produced a paper about a decentralized public key infrastructure https github com weboftrustinfo rebooting the web of trust blob master final documents dpki pdf dpki which registers identifiers and associated public keys on blockchains the non profit organization xdi org has designed a blockchain based registry https docs google com document d 1i xchgfsuai id85fwxjx6howdn9sq qe7arykjgsbi for human readable names and machine readable numbers consensys https consensys net has developed the blockchain based self sovereign identity system uport https www uport me to launch an internet of people http www ibtimes co uk ethereum studio consensys launches internet people digital ids assets secured unbuntu phones 1542620 id ee https www id ee is a program to build blockchain identity solutions related to the estonian e residency concept security flaw https www mccarthy ca en insights blogs cyberlex estonian blockchain based id card security flaw raises issues about identity found in estonian blockchain id bitalias https bitalias github io allows users to register names in the bitcoin blockchain and point them to their wallets etherid http etherid org allows registration of domain names for an ethereum account ens https github com nexusdev ens is the ethereal namespace a contract system and set of conventions to form a hierarchical namespace ethereum name service https ens domains is a naming system based on ethereum smart contracts that provides registration of human readable names as well as resolution to service and resource identifiers a name is registered by using an ethereum dapp to enter an auction process for the desired name evernym http www evernym com is developing a public permissioned distributed ledger called sovrin http www sovrin org which is designed specifically for self sovereign identity and privacy preserving cryptography it is fully open source foss as project indy https www hyperledger org projects indy within the hyperledger family multiple white papers https sovrin org library explain the the ideas https medium com evernym and technologies https indy readthedocs io en latest behind it at ethereum s devcon one conference a talk https www youtube com watch v qpatovahlr4 on blockchain digital identity and public key infrastructure was given bitnation https bitnation co seeks to establish the concept of world citizenship through identity registration on the blockchain the project is collaborating with the estonian e residency program and also has a focus on offering blockchain emergency ids https refugees bitnation co to refugees in december 2015 the linux foundation announced the launch of the hyperledger foundation https www hyperledger org a collaborative effort to develop enterprise grade blockchain tools and platforms whitepaper https www hyperledger org wp content uploads 2018 07 hl whitepaper introductiontohyperledger pdf architecture part 1 consensus https www hyperledger org wp content uploads 2017 08 hyperledger arch wg paper 1 consensus pdf architecture part 2 smart contracts https www hyperledger org wp content uploads 2018 04 hyperledger arch wg paper 2 smartcontracts pdf id2020 http id2020 org seeks to provide every child born after 2020 with a self sovereign digital identity which helps reduce risks of trafficking and drive digital inclusion shocard https shocard com is an early stage company developing an identity platform built on blockchain a research team http mm aueb gr at athens university of economics and business is working on information centric networking and is exploring the use of blockchain technology for content names the u s department of homeland security is funding https blog aniljohn com 2015 12 federal gov funds for identity r and d html research on the applicability of blockchain technology to privacy respecting identity management an mit paper http web media mit edu guyzys data znp15 pdf about decentralizing privacy using blockchain to protect personal data an ethereum blog post https blog ethereum org 2016 01 15 privacy on the blockchain about privacy on the blockchain including some thoughts about identity systems jolocom http jolocom com is developing a smartwallet for everyone to own their personal digital identity using social linked data https github com solid solid spec webid and verifiable claims standards as well as ethereum smart contracts the company focuses on decentralization and gdpr compliance and is part of the e u agile http agile iot eu iot consortium danube tech http danubetech com is collaborating with several other efforts to build blockchain based identifier registration data sharing and messaging infrastructure scuttlebot https scuttlebot io is a blockchain identity protocol avoiding a singleton based approach https scuttlebot io more articles design challenge avoid centralization and singletons html it embraces subjectivity over consensus e g each identity can publish messages that map their favorite pet name mappings for themselves and others patchwork https ssbc github io patchwork is a user facing decentralized messaging and sharing app based on scuttlebot startup cambridge blockchain http cambridge blockchain com is working on an identity blockchain for validating secure digital identity documents processing electronic signatures and recording transactions proof of individuality http proofofindividuality online addresses the challenge to prove that a person only has one account within a system without sacrificing the advantages of anonymity pseudonymity see here https medium com unlisted anti sybil protocol using virtual pseudonym parties 10276fcf3b20 for a draft implementation using virtual pseudonym parties regis http regis nu is a platform that makes it easy to build deploy and manage decentralized registries on the ethereum blockchain singleid http singleid com an app that allows you to be in control of their online identity it provides safe logins with no registration and no password idkeys https idkeys net is a distributed global identity system that registers cryptographic public keys on the stellar blockchain cheapid http guptaoption com cheapid is a digital identity standard designed for use in conflicted environment like those many refugees or disaster victims may find themselves in dids https w3c ccg github io did spec decentralized identifiers are a new type of identifier intended for digital identity that is self sovereign i e fully under the control of the identity owner dids resolve to ddos did descriptor objects and can be registered in different blockchains using different methods an article http www gsma com personaldata the relationship between blockchain and digital identity by the gsma about the relationship between blockchain and identity a snapshot of the identity landscape https oneworldidentity com wp content uploads 2018 10 companies png by oneworldidentity com authenteq http authenteq com is an automatic identity verification platform that uses a facial recognition algorithm to create a digital identity on a blockchain the humanized internet http www thehumanizedinternet org is building a prototype of an identity as a service platform relying on a blockchain system to store legal ids property titles education certificates and medical records deloitte smartid http www deloitte co uk smartid uses ethereum smart contracts to store endorse share and revoke attributes in order to enable users to automate digital processes such as customer registration and commercial kyc checks master thesis http essay utwente nl 71274 about self sovereign identity using blockchain technology by d s baars the fermat project http www fermat org founded the internet of people https iop global an open decentralized infrastructure consisting of device to device communication blockchain tokens profile servers and other components with the split from fermat in june 2017 iop switched from a centrally governed entity to a pure community project civic https www civic com is a secure identity platform using a blockchain and biometrics on mobile devices in order to provide multi factor authentication without a username password third party authenticator or physical hardware token sphere identity https sphereidentity com is a digital identity platform built on hyperledger fabric offering chaincode smart contracts and an api for third parties it uses xid tokens based on the bitcoin blockchain that are transfered upon successful identity transactions and trigger targeted advertising to the user original whitepaper https github com mark s cryptocoinwhitepapers blob master air platform whitepaper pdf blockchain helix https ico helix orange com is building a platform that consists of identity as a service data as a service and blockchain as a service on this platform different parties including individuals can manage and share both self asserted and verified information the company offers to increase the speed of kyc aml processes while hughly decreasing the cost of onboarding whitepaper https ico helix orange com wp content uploads 2018 08 helix orange whitepaper v1 5 pdf the pillar project http pillarproject io is planning to offer a personal data locker consisting of a wallet browser and token exchange personal assets will be put on a blockchain and pillar tokens will be issued securekey technologies http securekey com and ibm are partnering http www 03 ibm com press us en pressrelease 51841 wss to build a digital identity and attribute sharing network for canadian consumers using the permissioned private hyperledger fabric blockchain consent http www consent global is building a platform for trusted personal data applications and services using ethereum smart contracts to implement decentralized identifiers verified credentials consent receipts a web of trust and exchange of assets and value mooti https mooti co offers an identity chain technology that makes it possible to issue and revoke verified claims e g governmental medical financial etc the platform uses elliptic curve cryptography curve25519 secp256k1 and includes privay enhancing features e g to obfuscate issuers and holders of claims a lightweight mobile client is available banqu http www banquapp com focuses on establishing economic identity for those who are excluded from the global economy unbanked individuals can use a blockchain to establish personal and financial records by connecting to their banked network family friends small businesses ngos this history of blockchain based records helps to establish a baseline for future relationships with financial institutions vida identity https getvida io is a blockchain identity and authentication platform that enables distributed key revocation and reissuance access to data is always permissioned across applications and services the mathematical mesh http mathmesh com allows people to create profiles to help them secure and link together their devices cryptomesh http mathmesh com technical architecture index html is a proposal for a federated cloud infrastructure to support storage and retrieval of these profiles each portal provider in the cryptomesh maintains a linked log aka blockchain of all the profile updates published to it at regular intervals each portal provider publishes the last output of the linked log as a witness value spidchain http www spidchain com offers a platform for self sovereign identity including desktop and mobile apps for end users it uses decentralized identifiers dids backed by optionally bitcoin or ethereum to implement a marketplace for verifiable claims the spidchain applications allow individuals to create recover and revoke dids to authenticate to sign and verify files and claims and more whitepaper https drive google com file d 0b89we3iihmy1z0zsswvmvetaag8 view redd id https www reddcoin com service redd id is a naming service that allows usernames to be registered on the reddcoin https www reddcoin com blockchain usernames are public and searchable usernames can be associated with rich information such as public and private user profile details there is an ability to link usernames to social network identities the system supports operations familiar from the dns world such as expiration renewal and transfer forum https www reddcointalk org whitepaper https www reddcoin com papers posv pdf pro civis https procivis ch offers an e government as a service platform called eid it enables citizens to get an official electronic citizen id on a mobile app which can be used for secure and convenient login to websites and the electronic signing and safe storage of documents verification providers such as state authorities can use a web backend or an api to attest to the correctness of a citizen s personal data the platform includes the valid https valid global wallet and marketplace cicada https github com the laughing monkey cicada platform is a dapp platform built initally for a direct democracy use case it envisions using iris scans to generate decentralized universal identifiers huids for every human on the planet a method referred to as biocryptics huids can have sub ids to support selective disclosure pii can be stored in an info wallet key parts of the system also include smart contracts zero knowledge proofs mixnets and more vatar http aevatar com is a cooperative originating in france and established in several different countries that works on delivering self sovereign identity technologies using distributed ledger technology and verified claims it is guided by various regulations and principles such as the gdpr eidas the un s id2020 objectives and the cen workshop 84 standardization body ternity http aeternity com is a novel blockchain focusing on improved smart contract capabilities such as better scalability and easier integration of off chain data it uses value tokens called aeons it offers an identity architecture where every account has a unique id number and unique names can be registered and linked to arbitrary data such as addresses on the blockchain schema org s data structures are used for representing data about persons and organizations whitepaper https github com aeternity protocol bitid https github com bitid bitid is a an authentication protocol based on bitcoin identities supported by some of the bitcoin wallets it authenticates bitcoin addresses by signing a cryptographic challenge delivered e g via a qr code on a website using a bitcoin private key 2way io http 2way io is developing a peer to peer protocol for trust and identity on the internet it maintains blockchain agnosticism i e doesn t require but will be compatible with blockchain its architecture will be based on real life social and economic structures of human civilizations verifyunion https verifyunion io is building a platform for unique user profiles based on verified digital information social profiles and financial details leading to a social score tokens based on ethereum are designed to incentivize users to both supply and evaluate personal data for verification whitepaper https icoinform com uploads pdf 9e1089c29a2bdc3d91584d72662b831d pdf trusted key https www trustedkey com is a self sovereign digital identity platform based on ethereum it offers a secure mobile identity wallet and rest api web services that enable definitive user identity verification password less login as well as identity fraud prevention via secure transaction and document signing the design supports handling lost stolen or new device scenarios without having to trust any other party tradle https tradle io offers a global trust provisioning network to provide blockchain based kyc functionality for both intrabank and external transfers mobile and web interfaces as well as bots are available for both customers and employees of financial institutions nuggets http www nuggets life is a blockchain platform giving users a single biometric tool for login payment and identity verification it stores an individual s information in a personal cloud in zero knowledge blockchain storage a mobile app allows using the camera to add physical identity and payment cards selfkey https selfkey org is a self sovereign identity technology stack with an open source identity wallet for the identity owner a marketplace with real products and services a json ld protocol connection to 3rd party identity micro services and a native token called key which enables the selfkey ecosystem to exchange value and data democracy earth foundation http democracy earth is developing sovereign a blockchain direct democracy tool using vote tokens to grant democratic participation rights to every human a proof of individuality poi process based on peer to peer validation establishes that a self sovereign identity is uniquely tied to a single person the project introduces a number of interesting socio technical concepts such as social smart contract initial rights offering and cryptographically induced equality cooperation is happening with other decentralized identity initiatives such as blockstack and uport taqanu https www taqanu com is opening the financial ecosystem for anyone by using a blockchain based digital id to enable financial inclusion and create equal opportunities the illinois blockchain initiative https illinoisblockchain tech is partnering with evernym to develop a birth registry pilot where self sovereign identities are created and government agencies issue verifiable claims for birth registration attributes such as legal name date of birth sex or blood type ockam https www ockam io is creating a erc20 based platform that registers iot devices to a blockchain to solve systemic security and interoperability problems erc725 https github com ethereum eips issues 725 and erc735 https github com ethereum eips issues 735 are proposals in the ethereum community to standardize the use of smart contracts for certain identity related operations such as key management as well as signing transactions documents and claims which may be attested by third parties or self asserted boson me https boson me is a user claims provider verifier allowing third party access through oauth apis and erc725 erc735 access the data itself does not leak to external apps and stays in the hands of the user the platform supports identity verification through social media accounts the verified organization network https github com bcgov von is an initiative by the government of british columbia to create a trusted network of organizational data it allows organizations to claim credentials that are part of their own digital identity using a component called theorgbook https github com bcgov theorgbook that lists entities with their associated public verifiable claims alastria https alastria io is a non profit consortium building a national blockchain ecosystem for spain the security and veracity of information will be ensured through the identification of natural and legal persons while at the same time allowing citizens to have control over their personal information in a transparent way following the guidelines set by the european union blockcerts www blockcerts org is an open standard for issuing and verifying blockchain based official records such as cvic records academic credentials professional licenses workforce development and more the project offers open source libraries tools and mobile apps mit has started to issue https www insidehighered com news 2017 10 19 mit introduces digital diplomas digital certificates based on this standard kimlic http kimlic com is a mobile app that uses a private blockchain as a source of truth for identity it stores personal data on the mobile device and allows the sharing of verifiable identity claims and documents the datum https datum org network allows anyone to store structured data on a smart contract blockchain data can optionally be bought and sold on a marketplace using the dat token datum leverages bigchaindb and ipfs as data storage backends all data is encrypted and protected using aes256 gcm aversafe https www aversafe com allows individuals to store personal details work history certificates and achievements it leverages a permissioned blockchain for trusted audit and participation in the storage of attestation data separate from the actual data stored on users phones qed it http qed it com is building a platform for confidentiality on blockchain using scalable zero knowledge proof technology in order to achieve decentralization consensus and confidentiality at the same time this enables dynamic identity and proof for all with data to no one syscoin http syscoin org by blockchain foundry http www blockchainfoundry co offers an identity system that associates aliases with data and public keys aliases can be used for native syscoin services such as sending coins and encrypted messages aliases can also provide identity to bitcoin and zcash users aid tech https aid technology is a voucher and digital identity solution for refugees a digital record of a person s identity is stored on a smart card along with various additional information blockchain technology is used to distribute all resources in a highly traceable manner tierion https tierion com offers an api that uses the chainpoint https chainpoint org standard to record proofs on a blockchain that data was recorded at a specific time among many other uses this includes the ability to anchor verifiable records of customer data to optimize kyc processes pikciochain https pikciochain com is a proprietary network and blockchain architecture designed for the collection certification and exchange of personal data individuals install mobile apps that act as servers in a decentralized network and can earn pikcio tokens pkc by selling or certifying their data ontology https ont io is a distributed trust network which combines a cross chain identity system peer to peer data transmission data authorization mechanisms distributed data storage attestation and various industry specific modules it also includes an ontology crypto package ocp and an ontology marketplace om persona https persona im implements kyc processes using the ark https ark io blockchain paper documents such as passports or bank statements are saved in ipfs using a persona identity dashboard a notary then creates a hash of the content and publishes it on the persona blockchain bloom https hellobloom io is a blockchain project for credit scoring and identity management that uses ethereum and ipfs users create a bloomid contract that can be attested for by friends family and organizations the bloomiq system then reports and tracks debt obligations resulting in a bloomscore as a metric of consumers creditworthiness akarion https akarion com offers a blockchain bases saas product that helps companies to be gdpr compliant all gdpr relevant events are stored in a decentralized journal and visualized on a dashboard a paper https cboxxtest files wordpress com 2017 09 cboxxidentitymatters04 pdf called identity matters by cboxx https cboxx com about self sovereign identity that gives an overview of the concept humanitarian applications as well as relevant projects standards and communities in this space the rohingya project http www rohingyaproject com is a grassroots initiative that looks to grant each rohingya a personalized digital id and to tackle the problem of financial exclusion it aims to make it possible to cryptographically prove one s existence and family relations recorded on the blockchain keyp https keyp io does not use blockchain but still offers a self sovereign digital identity infrastructure a resource asks the user for specific attributes which are stored in a wallet on a secure device the wallet redirects the request to a specific authenticator that can validate the attribute the i o digital foundation https iodigital io offers a proof of stake blockchain called decentralised input output name server dions it will enable applications such as identity and alias registration storage of legal documents key exchange and encrypted messaging dominode https dominode com is building a self sovereign identity solution based on ipfs and public blockchains that focuses on identity for professionals in regulated industries identity data can be verified to be true and is fully portable ubic https github com ubic repo core is a blockchain based cryptocurrency that distributes a universal basic income to participants after they scan the nfc chip of their e passport blockid https onekosmos com product details by 1kosmos offers an app that can validate photos of physical id documents as well as record one s photo fingerprint and voice in a trusted identity safe it can be used to log in to websites and windows desktop apps encrypted identity data is also stored on a blockchain for backup purposes veres one https veres one is a distributed ledger built for identity supporting dids it has a governance and economics model and native support for did documents and object capabilities remme auth https remme io using a hyperledger sawtooth foundation remme implements a dpki its blockchain playing the role of ca and supporting x 509 certificates either signed by the user or an organization github https github com remmeauth juru https juru io core is an open platform where you can securely store and manage your identity and reputation today juru core is built on hyperledger fabric and bigchaindb https github com juru identity dbh17 and runs on a permissioned private blockchain the contributing nodes are hosted by all major banks which act as reputable gatekeeper it represents your identity and reputation using a smart contract attributes can be added by the identity owner and are stored in hash form attributes and endorsements are formed of field sets merkle root hashes are used to allow sharing and verification of partial data shyft network https www shyft network supports the collection of users data off chain using traditional databases and collection strategies with the ability to provide attestation points for third party utilization whitepaper https www shyft network pdfs shyft network inc whitepaper v3 1 pdf myearth http myearth id myearthid will be the first decentralized identity management system ims built on hashgraph where the user will own the id that can be used for various purposes trust score kept based on user activity whitepaper http myearth id wp content uploads 2018 04 earth id updated v1 1 pdf hu manity org https hu manity org is borderless and non political and is responsible for championing choice and continuous consent to ensure people have a say as to how their data is used hu manity co https hu manity co is the commercial part of the venture that is responsible for the creation and maintenance of the my31 app hu manity science https hu manity science is responsible for researching the convergence of social good and technological innovation to find new ways where technology can solve real world problems zulu republic https www zulurepublic io is an ecosystem of blockchain tools services and platforms designed as a place where people businesses and organizations can thrive on their own terms a place where the real promise of the cryptocurrency revolution can be realized citizens of the zulu republic live anywhere and everywhere united by a shared vision for a future of economic freedom and empowerment of taking back our destinies from powerful centralized institutions whitepaper https www zulurepublic io whitepaper blocknify https blocknify com for freelancers and small business to sign and securely send their documents to be signed without their papers touching any server at any time handshake https handshake org to replace centralized trusted internet infrastructure with a decentralized certificate authority and globally unique namespace composed of a decentralized blockchain and cryptographic proofs backed by cryptoeconomic mechanisms this construction enables the namespaces to point directly to a compact certificate representing a trust anchor which does not rely upon a single trusted authority to create attestations as in the existing federated certificate authority model handshake builds in compact verifiable proofs to ensure compatibility with embedded and mobile devices with significant committed merkelized state proof size and performance improvements whitepaper https handshake org files handshake txt urbit https urbit org is a virtual city of general purpose personal servers what s a personal server in a sense you already have one your personal server is the combination of all the cloud services you use now this server is a mess it s broken into 17 different fragments which are scattered all over the planet you have no control at all over any of the pieces the more we depend on web services the more we realize how unsustainable this situation is docs https urbit org docs ycombinator https news ycombinator com item id 11817721 vetri global https vetri global is a self sovereign blockchain based digital identity and personal data platform connecting identity owners with data consumers once completed vetri will operate as a not for profit peer to peer open source personal data management platform managed by the vetri foundation the platform will consist of the vetri wallet and the vetri marketplace everest https everest org combines everid a user centric self sovereign identity solution with everwallet a value transfer and document storage solution and everchain a robust transaction system to create and record all system transactions this product suite is based on blockchain technology and the cryptographic underpinnings of that system the core focus of the everest operating company is to create economic and social value whitepaper https everest org wp content uploads 2018 10 everest whitepaper nov2018 v1 pdf the agrello https www agrello io platform is a dashboard where you can manage your identity create contracts sign the contracts using agrello legally binding signature and have an overview of all of your agreements gataca http gatacaid com delivers fast and secure customer on boarding experiences by removing the burden of identity verification compliance from businesses our products verification sdk and nopassword sign in enable fully automated kyc processes and simplify gdpr compliance clear me https www clear me verified identity claims are digitally signed by issuers encrypted and stored via the blockchain and decentralized systems these claims could include complete know your customer kyc compliance document authentication or enable privacy through our unique anonymous verification protocol avp we are also extending support for zero knowledge proofs through zksnarks poa network https poa network is an ethereum based platform that offers an open source framework for smart contracts poa network is a sidechain to ethereum utilizing proof of authority as its consensus mechanism poa provides developers with the flexibility to code in ethereum standards with the added benefits of poa network s solutions to scalability and interoperability in blockchain networks blog post https medium com poa network poa network how honey badger bft consensus works 4b16c0f1ff94 essentia https essentia one is a modular decentralized system of interactions and data management based on a hybrid pow pos consensus protocol has a ess id component central to its makeup but not deeply described in the whitepaper https essentia one files en essentia blockchain pdf digidentity https www digidentity eu you can add an eherkenning to your digidentity but you can also use esgng for digital signing with your digidentity you can log in to websites or digital services and conduct your business securely and simply the eu member states have agreed that as from september 2018 european citizens and businesses must be able to log in to all dutch public sector organisations using their own national login scheme lifeid https lifeid io all pii such as name date of birth current living address etc are never stored on the lifeid platform this information is encrypted and only stored on a secure device such as the person s phone whitepaper https lifeid io whitepaper pdf usechain http www usechain net is dedicated to developing a public chain based on mirror identity establishing an ecosystem based on identity public chain promoting the implementation of all sorts of blockchain applications that links blockchain addresses to verified real users and realizing close integration between social credit infrastructure and commercial use project whitepaper https www usechain net usechain en pdf tech whitepaper https www usechain net usechain tech en pdf ydentity http ydentity org this erc20 token has a purchase mechanism under btc or eth and is designed to address the main elements of general data protection regulation gdpr in a time of technological advancement when the consumer has never been more aware of the value of their data whitepaper http ydentity org doc ydentitywhitepaper1 0 pdf digi id https www digi id io is an authentication method based on the security of the digibyte blockchain this allows you to log in to a website application building security and more by simply scanning or tapping on a qr code digi id does away with the need for usernames and password or it can be used to compliment them for additional security github https github com digibyte digiid js docs https www digi id io documentation html the vision of 0xcert https 0xcert org is to provide an open protocol for standardized and certified non fungible tokens to a wider tech audience with 0xcert you can build on top of the non fungible token standard employing a complete toolset development framework and a set of conventions for various use cases technical paper https 0xcert org technical paper pdf whitepaper https 0xcert org whitepaper pdf github https github com 0xcert graphchain https github com makolab graphchain rather than trying to add graphs and ontologies to blockchain graphchain starts with rdf database and then adds blockchain features to the system legal entity identifier blockchained by a hyperledger indy implementation of graphchain this paper http www graphchain io mtsr2018 pdf presents an implementation of graphchain in the hyperledger indy framework the whole setting is shown to be applied to the rdf graphs containing information about legal entity identifiers leis slideshare https www slideshare net sopekmir graphchain t mobile unveils identity platform next https cryptoslate com t mobile next identity platform hyperledger sawtooth https github com hyperledger sawtooth next directory next identity platform in a company with millions of users with differing levels of service permission management is a considerable bottleneck regulations around user security and privacy add a further layer of complexity to such a system next identity combines the functionality of a traditional database with the benefits of a centralized ledger the system handles user identities accesses and approvals while retaining the integrity of an immutable blockchain press release http intelligentsystemsmonitoring com community blockchain community t mobile unveils the next identity platform a blockchain powered database dock https dock io decentralized data exchange powered by ethereum by utilizing the secure ethereum mainchain data encryption as well as a token model the dock protocol will allow users to take control of their data and exchange it between applications the dock token model will simultaneously motivate applications to exchange information by making it beneficial for both platforms involved in the transaction whitepaper https dock io whitepaper herdius https herdius com intends to build a new infrastructure layer on top of all blockchains through our vertically scalable chain and distributed virtual wallet network herdius aims to tackle identity interoperability as well as create a crypto asset agnostic decentralized exchange ixo foundation http ixo foundation we are developing the mechanisms to share data sets through software mediated governance mechanisms using the ocean protocol data resources will become locatable across any data store using content addressing based on the interplanetary linked data ipld specification the quality of these datasets will improve through the economic incentives and coordination capabilities of curation markets as described by simon de la rouviere whitepaper https ixo foundation wp content uploads 2018 08 ixo technical white paper w cover version 3 0 8 december 2017 1 pdf human trust protocol https www hubtoken org envision a world in which interactions and transactions between internet strangers are supported by a new trust layer on the internet enabled by the human trust protocol reputation becomes self sovereign under the control of users with appropriate permissions anyone will be able to assess the relevant trustworthiness of anyone else with whom they are about to engage and users can transfer their trust from one community to any other in short there is an opportunity to rework the underlying incentive mechanisms of social networking and sharing economy services to create more trustworthy interaction introduction https www hubtoken org images hub introduction pdf whitepaper https www hubtoken org images hub white paper pdf holonet https simbol io is an open source project that implements the decentralized identity specifications for open web vr platforms https www roadtovr com decentralizing identity in vr with holonet self sovereign identity like webxr finid http finid me is a mobile wallet and a transparent eu compliant trusted services provider powered by blockchain infrastructure supporting self sovereign identity ssid our goal is to make ssid compatible with the existing eu eid infrastructure crayonic https www crayonic com ecure digital identity for people and things crayonic develops a hardware module to secure digital identity we refer to it as crayonic identity core or cic cic hardware module is running crayonic identity os firmware which will soon be open sourced these two technologies combined are the basis for all identity projects within our company and soon it will be available to any one wishing to develop projects where secure identity plays a major role this technology is protecting identities in all types of digital interactions person to person p2p person to machine p2m machine to machine m2m blockpass https www blockpass org is an identity application for regulated services and the internet of things iot it is positioned as a first step towards the development of a fully self sovereign identity protocol for the internet of everything ioe a self sovereign identity application is a platform where users can establish store and manage identities whilst maintaining full control over all data involved data collected to establish a self sovereign identity is not stored on any central server instead the data is passed to the verifier be it a machine or a human to view only for so long as is required to create the identity when the verification is completed the data is sent back to the user s own personal device whitepaper https www blockpass org downloads blockpasswhitepaper v1 3 2 pdf ledgerstate https www ledgerstate io shapes their product to the end user s needs by not being tied to one specific decentralizing technology instead they pick from the best technologies to create a tailored application for each use case some of the technologies used include hashgraph yoti ethereum we make decentralization and the blockchain simple yoti the digital identity platform https www businesswire com news home 20180125005600 en yoti ledgerstate showcase next generation blockchain technology transform lets people create verified digital identities through their free smartphone app the app uses facial recognition technology and a security team to match facial biometrics to approved photo ids these digital identities can then be written to a private ledger using an evolution of blockchain technology called hashgraph keeex https keeex me deploys bitcoin bip32 self sovereign identity https keeex me keeex deploys bitcoin bip32 self sovereign identity keeex seals trusted metadata in your files to ensure integrity source and date our universal technology makes digital security accessible to everyone and allows you to protect all your file formats your data has value and is easily trackable thanks to a unique identifier it embeds the link between your documents your processes and event ledgers blockchain off chain register you are no longer dependent on an infrastructure or blockchain all the proofs are in your data bip32 https github com bitcoin bips blob master bip 0032 mediawiki hierarchical deterministic wallets can be used to self define publish and revoke a cryptographic identity this identity can be used to generate one time signatures for every item signed hence achieving unprecedented signature security cultu re https cultu re is blockchain governance and self sovereignty for an interplanetary society universal citizenship id a program for self sovereign identity systems empowering community stewardship over centralized ownership universal love agreements provide couples around the world with a way to register and verify their union on their terms without the need for third party interference to complicate agreements or prevent individuals from their engagement universal housing network register tangible property or virtual land and objects on the blockchain at zero cost in addition to recording permanent ownership users can list temporary habitats on the network as freespace for various cultures and citizens to play in and create community iov42 com https www iov42 com iov42 is a technology provider accelerating financial and non financial http bbfund com wp content uploads 2017 10 bbfund geninfo oct2017 pdf transactions based on cutting edge artificial intelligence and blockchain technology iov42 is the solution for banks and other participants to reduce transactional compliance costs increase profit liquidity and offer revolutionary new products as well as for fintechs around the globe to generate new revenue streams signd id https signd id smart contracts and identity sharing by signd make onboarding contracts kyc ad hoc insurances as simple as saying hello cryptonomica net https cryptonomica net is an identity verification service based on openpgp https en wikipedia org wiki pretty good privacy and ethereum https www ethereum org with legal framework and online dispute resolution for electronic contracts from london based court of arbitration https cryptonomica net arbitration myidsafe https myidsafe org is a consortium of major austrian companies that are collaborating to build a self sovereign identity ecosystem based on dids hyperledger indy and other technologies kilt https kilt io is a blockchain and protocol that allows attesters to issue digital claims to users who can then present them to verifiers claims are stored in a user s wallet claims are signed and a checksum is stored on a blockchain diode https diode io is developing a blockchain based decentralized pki for resource constrainted devices the system is implemented with a new super light client protocol for ethereum called blockquick sowl https esatus com sowl formerly known as self https self ssi com is a next gen identity access management software that connects legacy authorization sources like ldap active directory azure ad scim and jdbc to self sovereign identity technology using hyperledger indy aries and provides sso idp features saml oauth oidc over ssi as well sowl was developed by esatus ag https esatus com ceramic http ceramic network is a peer to peer verifiable storage graph that anchors updates in a blockchain providing for scalable publishing linking and querying of identity information and links that can be used on any network it supports the idx http idx xyz identity index standard and 3box http 3box io distributed data framework idena https idena io is a proof of person blockchain that provides a validation method that is pseudonymous and based on attending regular validation ceremonies in which the user needs to solve a series of flip tests a flip is a sort of ai hard captcha that helps to determine whether a user is human the idena protocol solves the blockchain oracle problem its independent mining nodes can act as oracles across various blockchains idena accounts are compatible with ethereum kuwa http kuwa org is an experimental ethereum based identity platform designed to support basic income distributions kuwa can leverage social graphs combined with voice and face recognition to detect sybil attacks kuwa s poker protocol is to designed to support permissionless implementations brightid https www brightid org is a personal stamp of uniqueness it uses the people you know a trust graph to enforce one account per person for important applications like voting and universal basic income a brightid proves you re a unique person unik name https unik name com offers human readable names protected against typo squatting and fraud minted as self sovereign digital assets on the uns blockchain unik name can be used to authenticate yourself on your favorite centralized websites as a highly secure drop in replacement of google or facebook social logins but preserving your privacy and your anonymity uns blockchain is the first ark https ark io bridgechain implementing the non fungible token concept https github com arkecosystem aips issues 70 validated id https www validatedid com is a trust service provider that offers digital signature services and provides a ssi solution for entities and users this latter is conformed by vidchain api https www validatedid com vidchain which enables entities to issue credentials and validate presentations and vidwallet which enables users to hold their credentials securely vidwallet is available for android https play google com store apps details id com validatedid wallet ios https apps apple com es app vidwallet id1554340592 | blockchain |
|
sql-challenge | sql background designed the tables to hold data in the csvs import the csvs into a sql database and answer questions about the data in other words you will perform data modeling data engineering data analysis before you begin create a new repository for this project called sql challenge do not add this homework to an existing repository clone the new repository to your computer inside your local git repository create a directory for the sql challenge use a folder name to correspond to the challenge employeesql add your files to this folder push the above changes to github data modeling inspect the csvs and sketch out an erd of the tables feel free to use a tool like http www quickdatabasediagrams com data engineering use the information you have to create a table schema for each of the six csv files remember to specify data types primary keys foreign keys and other constraints import each csv file into the corresponding sql table data analysis once you have a complete database do the following list the following details of each employee employee number last name first name gender and salary list employees who were hired in 1986 list the manager of each department with the following information department number department name the manager s employee number last name first name and start and end employment dates list the department of each employee with the following information employee number last name first name and department name list all employees whose first name is hercules and last names begin with b list all employees in the sales department including their employee number last name first name and department name list all employees in the sales and development departments including their employee number last name first name and department name in descending order list the frequency count of employee last names i e how many employees share each last name | server |
|
blocksec-incidents | blocksec incidents a curated list of blockchain security incidents including exchange hacks defi compromises blockchain attacks and others subscribe to blockchain threat intelligence https blockthreat substack com for news of the latest incidents exchange and cryptobusiness incidents exchange incidents involving blockchain protocols e g 51 attacks node and wallet software other related technologies defi and smart contract incidents defi incidents involving defi dex nft and other smart contract projects blockchain incidents blockchain incidents involving blockchain protocols e g 51 attacks node and wallet software other related technologies | blockchain |
|
esp-open-rtos-driver-i2c | yet another i2c driver for the esp8266 this time a driver for the excellent esp open rtos this is a bit banging i2c driver based on the wikipedia pesudo c code 1 adding to your project add the driver to your project as a submodule rather than cloning it git submodule add https github com kanflo esp open rtos driver i2c git i2c the esp open rtos makefile fu will make sure the driver is built usage include i2c h define scl pin 0 define sda pin 2 uint8 t slave addr 0x20 uint8 t reg addr 0x1f uint8 t reg data uint8 t data reg addr 0xc8 i2c init scl pin sda pin write data to slave bool success i2c slave write slave addr data sizeof data issue write to slave sending reg addr followed by reading 1 byte success i2c slave read slave addr reg addr reg data 1 the driver is released under the mit license 1 https en wikipedia org wiki i c example of bit banging the i c2 b2c master protocol | os |
|
SprinklerBoard | sprinklerboard this project is a cumulation of a nodemcu board incorporated into a circuit to control and manage the sprinkler sytems at my residence involving temperature and humidity sensors as extra features and an android app encoded in java to control the same thingspeak is being used as the backend api to communicate with the app and the development board both ways elaborate documentation will be added later | server |
|
book-of-modern-frontend-tooling | the little book of modern front end tooling a free open source book introducing you to the world of tooling for modern web applications currently a wip chapters introduction why automate command line node and npm build systems introduction https github com tooling book of modern frontend tooling issues 19 grunt https github com tooling book of modern frontend tooling issues 2 brunch https github com tooling book of modern frontend tooling issues 5 gulp https github com tooling book of modern frontend tooling issues 3 automation with npm run https github com tooling book of modern frontend tooling issues 22 scaffolding yeoman https github com tooling book of modern frontend tooling issues 4 lineman https github com tooling book of modern frontend tooling issues 27 loom dependency management bower https github com tooling book of modern frontend tooling issues 6 npm browserify https github com tooling book of modern frontend tooling issues 7 componentjs https github com tooling book of modern frontend tooling issues 11 webpack https github com tooling book of modern frontend tooling issues 20 status this book is currently in progress the idea is to capture enough useful content on each topic that a beginner could get started with a specific tool in a short space of time we will aim to present all tools in a balanced light providing the user with enough information to make up their minds on what makes sense for them to use the book will be kept up to date by the authors and pull requests from the community will be happily accepted as with any oss project getting involved we are currently looking for authors interested in contributing new content on one of the topics above authors who have previously written detailed posts about one of the suggested topics that could be refreshed and integrated devs interested in helping us improve the current build setup new issues will be created for each corresponding section so commenting on the appropriate thread would be the best way to let us know you re interested why a book vs blog posts blog posts are an excellent way to spread knowledge but they are typically ephemeral this is particularly challenging in the fast paced world of tooling by harnessing the collaborative power of the front end community we feel we can create a reliable succinct resource that is kept up to date in the open anyone can get access to it anyone can improve it generating the book dependencies at the moment the following dependencies are required to export the book to epub file format tex live http www tug org texlive acquire netinstall html if you are using osx use mactex http tug org mactex downloading html pandoc http johnmacfarlane net pandoc developing the site template the html site design exists in the template folder we use jade for html and scss for css building make sure you are running node 0 10 0 and run npm install to install the development dependencies this project uses gulpjs tasks to build the book from markdown files as listed on the table of contents chapters toc md to various file formats gulp generate pdf generate a pdf version of the book gulp generate site generate a html version of the book gulp generate epub generate a epub version of the book output the output from the build phase will be available in the dist folder licensing a rel license href http creativecommons org licenses by nc 4 0 img alt creative commons license style border width 0 src http i creativecommons org l by nc 4 0 88x31 png a br this work is licensed under a a rel license href http creativecommons org licenses by nc 4 0 creative commons attribution noncommercial 4 0 international license a | front_end |
|
Metro-UI-CSS | p align center a href https metroui org ua img src https metroui org ua images metro xscode logo jpg alt a h3 align center metro 4 components library h3 p p align center sleek intuitive and powerful front end framework for faster and easier web development build responsive mobile first projects on the web with the first front end component library in metro style br a href https metroui org ua strong explore metro 4 docs strong a p p align center metro 4 is an mit licensed open source project it s an independent project with its ongoing development made possible entirely thanks to the support by these br a href https metroui org ua support html backers strong awesome backers strong a p p align center a href https www patreon com metroui img src https c5 patreon com external logo become a patron button 2x png height 38 a a href https www buymeacoffee com pimenov img src https metroui org ua images buy me coffee2 png height 38 a p br build status https travis ci org olton metro ui css svg branch master https travis ci org olton metro ui css dependencies https img shields io badge dependencies none darklime svg css gzip size http img badgesize io olton metro ui css master build css metro all min css compression gzip label css gzip https github com olton metro ui css blob master build css metro all min css js gzip size http img badgesize io olton metro ui css master build js metro min js compression gzip label js gzip https github com olton metro ui css blob master build js metro min js icons gzip size http img badgesize io olton metro ui css master build mif metro woff compression gzip label icons gzip https github com olton metro ui css tree master build mif github release https img shields io github v release olton metro ui css color darklime npm version https badge fury io js metro4 svg https badge fury io js metro4 nuget https img shields io nuget v metro4 svg color darklime website https img shields io website https metroui org ua svg license mit https img shields io badge license mit blue svg style flat github issues https img shields io github issues raw olton metro ui css svg github code size in bytes https img shields io github languages code size olton metro ui css svg license and premium features this project licensed under the mit license in addition support pack is available for an annual subscription on https korzh com https https korzh com and for a patreon patrons https www patreon com metroui support pack includes an extra time for priority support by email and other options community facebook https img shields io badge facebook group blue svg style flat https www facebook com groups metrouicss join the chat at https discord gg nydrab3 https img shields io badge chat on 20discord brightgreen svg style flat https discord gg nydrab3 contributing all contributions are welcome learn more about how you can contribute to this project here contributing md important before you create pull request you must sign cla docs please click here https metroui org ua for documentation and demo releases metro 4 releases frequently i am create release when there are significant bug fixes new apis or components the usual frequency of release of the new version is one week on sundays lts long term support of older versions of metro 4 does not currently exist if your current version of metro 4 works for you you can stay on it for as long as you d like if you want to make use of new features as they come in you should upgrade to a newer version browser compatibility chrome https raw github com alrra browser logos master src chrome chrome 48x48 png firefox https raw github com alrra browser logos master src firefox firefox 48x48 png edge https raw github com alrra browser logos master src edge edge 48x48 png safari https raw github com alrra browser logos master src safari safari 48x48 png opera https raw github com alrra browser logos master src opera opera 48x48 png latest 2 latest 2 latest 2 latest 2 latest 2 old version metro ui css 3 x you can find in a repo metro ui css 3 https github com olton metro ui css 3 metro ui css 2 x you can find in a repo metro ui css 2 https github com olton metro ui css 2 metro ui css 0 x you can find in a repo metro ui css 095 https github com olton metro ui css 095 documentation and demo for v3 metroui org ua v3 https metroui org ua v3 documentation and demo for v2 metroui org ua v2 https metroui org ua v2 documentation and demo for v0 metroui org ua v0 https metroui org ua v0 thanks thanks to all special thanks to all those who financially supported the project credits you can read about credits here credits md 2012 2020 copyright by serhii pimenov all rights reserved created by serhii pimenov | css javascript jquery less html html5 metro metro-ui metro-ui-css metro4 bootstrap bootstrap-replacement components component-library no-dependencies no-jquery-required css-frameworks css-framework metro-style | front_end |
FreeRTOS_helpers | freertos helpers we see lots of vendors application developers and a few consultants pontificating and spewing about how solid their tools and processes and applications are citing misra compliance and other bullox if they would shut up for a moment and glance downwards they d notice they are wearing no pants and standing in quicksand in the middle of a swamp and surrounded by crocodiles https upload wikimedia org wikipedia commons thumb 9 95 quicksandwarning jpg 440px quicksandwarning jpg if you re using freertos and gcc i hope the tools in this repository can help you create a stable platform for your applications using freertos at least a bit after all as my wife sometimes reminds it is best to wear pants and most prudent to avoid standing in quicksand amidst crocodiles thoughts about freertos we ve delivered many successful products using freertos more than a dozen for sure but truly i ve lost count this on mcus like pic24f pic32mx ti msp430 and arm cortex from m0 through m7 from freescale nxp silicon labs etc freertos supports a number of compilers though here we primarily use gcc we and our community are forever in debt to richard barry for his most excellent efforts and glad i was able to help a bit with the cortex m0 port so what s not to like freertos provides a truly excellent os with pretty much all the features you need for non trivial applications on mcus single core anyway however freertos does not provide integration with the mcu vendor toolchains that s left to the mcu vendors most importantly for typical embedded applications freertos does not provide nor integrate use of device drivers ethernet serial usb crypto etc standard apis for device drivers ie sending receiving data via usb cdc usb stack low level memory management sbrk level for many toolchains integration with c rtl freertos assumes a working c toolchain lwip recently documented on freertos site as more performant than freertos tcp ip as the vendor provided bits are usually crap it often takes more time money to create a working basic platform than the actual target application not a great state of affairs and as the complexity of the mcus and peripherals and required drivers continues to increase the situation worsens way back we used to expect to write all device drivers ourselves but that is no longer sensible from cost nor time to market perspectives we support freertos yeah woo hoo well so the mcu vendors loudly lie the reality is horrendous if you actually need to build an application that is both performant and reliable the stuff provided by mcu vendors is often completely unworkable typical fuckups include memory management is completely broken your application will crash or behave mysteriously and corrupt memory when you try to use sprintf dtoa strtok or other commonly utilitized c rtl functions see the heap usenewlib section below for a solution to this one especially if you re trying to use st mcus drivers do not use freertos facilities for performance and interrupt latency we expect and require minimal code in isrs moving data to from higher layers via rtos facilities see https www freertos org deferred interrupt processing html for a great explanation instead we see crap code like st incomplete buggy and horrendously coded usb stack executed almost entirely within isr even using malloc inside isr incomplete usb functionality inadequate performance and hugely excessive interrupt latency as an added bonus drops usb packets under load st buggy ethernet drivers missing required memory barriers not properly coded for context safety ie race conditions between isr code and foreground code st improper lwip integration st crypto hardware but no drivers integrated into tcp ip to support https etc microchip buggy drivers polled in a single timer based thread not properly integrated with freertos you probably won t notice this if you try to use microchip s harmony framework as most likely the output of their configuration wizard won t even compile silicon labs usb driver incomplete buggy and not integrated with freertos i could go on but it gives me a headache again the consequence of this sad state of affairs is it often costs more time money to get a working and performant platform than to create your actual application you get to rewrite and stress test drivers and their rtos integration for your chosen peripherals and if you survive that maybe you can develop your application the tools below don t address the driver mess but at least aid in basic use of freertos safe memory management heap usenewlib gnu arm embedded toolchain distributions https developer arm com open source gnu toolchain gnu rm include a non polluting reduced size runtime library called newlib or newlib nano for the smallest variant if you use an mcu vendor distributed toolchain you re typically using these tools unfortunately newlib internally uses free storage malloc free in startling places within the c runtime library thus newlib free storage routines get dragged in and used unexpectedly often mcu vendors don t properly support newlib use within freertos thus your application will crash or behave mysteriously and corrupt memory when you try to use sprintf dtoa strtok or other commonly utilitized c rtl functions the heap usenewlib solution i ve provided here is used in dozens if not hundreds of applications heap usenewlib is distributed by nxp as part of the mcuxpresso sdk part of erich styger s popular processor expert tool https mcuoneclipse com category processor expert some freertos on arduino packages like st s stm32duino https github com stm32duino stm32freertos etc it is not included in freertos because i did not provide versions for all the compilers freertos supports please see my web pages for details about the problem and how to use the solution code freertos and linker configuration provided in this repository nxp mcuxpresso users http www nadler com embedded nxp newlibandfreertos html st rubemx users http www nadler com embedded newlibandfreertos html other mcus and toolchains start with the nxp version freertos isr stack use check for arm cortex m4 7 on arm freertos isrs run on the dedicated msp stack allocated at top of ram this is great as you don t need to reserve stack space for the deepest nested isr stack use for every single task as on older processors while freertos provides great tools for checking actual stack use for tasks freertos does not provide any means for checking actual msp stack use by your isrs obviously serious developers need to verify adequate isr stack space especially with any complex and or nested isrs port drn c adds code to check msp stack use to use port drn c exclude freertos amazon freertos freertos kernel portable gcc arm cm4f port c from your build and add port drn c ensure you ve got required space allocation in your ld then configure your msp stack size and enable msp checking by adding to your freertosconfig h drn isr msp stack initialization and checking if defined externc if defined cplusplus define externc extern c else define externc extern endif endif define configisr stack size words 0x100 in words must be valid constant for gcc assembler define configsupport isr stack check 1 drn initialize and check isr stack externc unsigned long ubasetype t xunusedisrstackwords void check unused amount at runtime todo add the other tools | os |
|
2017-BMS-Project-QPSK-Modulation-Demodulation | fit but bms qpsk modulator demodulator school project for bms wireless and mobile networks class faculty of information technology brno university of technology fit vut bms qpsk modul tor demodul tor koln projekt do p edm tu bms bezdr tov a mobiln s t fakulta informa n ch technologi vysok u en technick v brn | server |
|
CS-492 | cs 492 cs 492 mobile software development summer 2020 | front_end |
|
concept-based-demonstration-selection | large language models are implicitly topic models explaining and finding good demonstrations for in context learning this is the official repository of the paper large language models are implicitly topic models explaining and finding good demonstrations for in context learning https arxiv org abs 2301 11916 a large portion of the code is based on the metaicl codebase https github com facebookresearch metaicl method img method png preparation the code is tested with python 3 8 install the data dependencies and download the data bash conda create name metaicl data python 3 8 conda activate metaicl data pip install datasets 1 4 0 wget cd preprocess python run py after preprocesisng is done come back to the main directory bash cd conda deactivate now install the model dependencies to run the model please note that the transformer version is not compatible to the datasets library used to download the data so make sure to use a different environment conda create name metaicl python 3 8 conda activate metaicl pip install torch 1 9 0 pip install git https github com huggingface transformers git c37573806ab3526dd805c49cbe2489ad4d68a9d7 pip install sentence transformers optional install openai python library for running gpt 3 pip install openai latent concept learning to obtain the concept tokens please first run the script tensorize sh then run the script train sh we simutaniously train a set of datasets together and obtain separate concept tokens for each datasets this set of datasets is called a task currently we define 3 tasks glue diverse and tune you can see what datasets are contained in each task by inspecting the corresponding json file in config the concept tokens of these 3 tasks will be stored in checkpoints we also provide some example concept token embeddings at this google drive folder https drive google com drive folders 15uefnujk1akaxlhpq0irwnf566apxnwt usp share link to reproduce our results demonstration selection to obtain performance on test set by using different way to choose the in context examples you can use prior sh prior easiest means choosing the examples that can most likely infer the learned concept tokens prior most similar means choosing the examples that are most similar to the test input by commenting out the prior line examples will be chosen uniformly more details of each argument can be found in test py in variables we provide the value of bash script variables to reproduce our results | deep-learning large-language-models machine-learning prompting | ai |
IoT-App-Backend | iot app backend backend und organisation der iot app die im rahmen des moduls full stack development 2019 an der fh bielefeld ensteht build status https www travis ci org jraddatz iot app backend svg branch master https travis ci org jraddatz iot app backend | server |
|
NLP-tag-classification-with-GloVe-and-LSTM | text classification using glove and lstm nlp natural language processing from data preparation to building model and deploy the model to web service part 1 preparing data https github com sweetflowerjulia nlp model text category with glove and lstm blob master preparing 20data ipynb read document clean data convert to phrases labeling and generating training dataset part 2 building the nlp model https github com sweetflowerjulia nlp model text category with glove and lstm blob master nlp 20model text 20multi classification ipynb load pre trained glove word embeddings tokenize the text create embedding matrix create neural network model in keras embedding matrix convolutional layer lstm softmax part 3 model deployment in azure microsoft web service https github com sweetflowerjulia nlp model text category with glove and lstm blob master deploy 20nlp 20model 20to 20azure ipynb create workspace pickle the model register the model create image deploy webservice test calling web service | nlp natural-language-processing glove glove-embeddings lstm text-classification machine-learning azure azureml webservice deploy model | ai |
MLE-Flashcards | machine learning research engineering flashcards image https user images githubusercontent com 20059131 180619266 6319972e 03c3 42f7 8d88 bdd240cb13bc png these are 200 flashcards i made to review everything from my years of ml research classes and independent study creating them helped me prepare for machine learning engineer interviews and was able to get offers from several companies in 2022 including google tesla samsung motional uipath and tiktok hopefully other people can benefit from them as well the pdfs in this repo are mostly for convenience check out these presentation slide links for the most up to date and animated q a versions with additional links in the speaker notes 1 computer science slides https docs google com presentation d 1ugida3 vgqqza3kqudieiuppf2 djsh9 c1srv0gfrs edit usp sharing 2 machine learning general slides https docs google com presentation d 1qsowbrjemztxqqnqb9xrav7qsb6sjrlz4pzbckpvzya edit usp sharing 3 fundamentals for computer vision deep learning slides https docs google com presentation d 1ru9upxlxnx7fz3bxcq sh9tb6nhtoflyya1n umzv2g edit usp sharing 4 selected topics in computer vision deep learning slides https docs google com presentation d 1twwikr gi3uo0qku cbfldgovsyv pd8g kjuzvm4mc edit usp sharing questions are loosely based off chip huyen s ml interviews book questions https huyenchip com ml interviews book contents part ii questions html however some slides might be overly technical or academic and not relevant to engineers the most important slides in my opinion are marked with a star in the lower left corner ins disclaimer these slides do not contain any specific interview questions from any companies i actually completed them before i interviewed anywhere as an academic exercise for myself the flashcards cover various fundamental topics and would likely serve as a good foundation for broad knowledge in the fields of cs and ml ins intended scope and audience this covers computer science classical machine learning and modern deep learning with an emphasis on computer vision it generally assumes a good foundation in these topics and a lot of technical terminology is used i think the approach might be different depending on your current experience already have a good foundation in ml you can probably use them as is to review and fill in any missing knowledge gaps newer to ml this may provide a good overview of what is out there and i d suggest also refering to other materials focused on education learning see additional links below contributing because of gaps in my understanding and because the field is constantly changing this is not meant to be a definitive resource there may be errors in these slides or things that i ve missed if so feel free to make a post as an issue in github please mark the slide in question so others can easily find it e g if you want to discuss machine learning general slide 14 add 2 14 to the title additional links resources the most useful resource i ve found to learn about the mle interview process holistically https huyenchip com ml interviews book useful course materials for ml from stanford and uc berkeley http cs231n stanford edu https fullstackdeeplearning com spring2021 resources for the programming portion https www crackingthecodinginterview com https leetcode com | ai artificial-intelligence computer-vision machine-learning computer-science flashcards interview interview-preparation review | ai |
blog-scaffold-dbcontext-efcore | reverse engineering with entity framework core integration of an existing relational database system not all development projects start from scratch if you need to integrate an existing relational database system into your net https docs microsoft com en us dotnet software application then entity framework core https docs microsoft com en us ef hereafter ef core provides you with a useful tool to master the required database first approach https www entityframeworktutorial net entityframework6 introduction aspx this blog post will show you how ef core cli https en wikipedia org wiki command line interface can simplify the reverse engineering of an existing relational database system and dramatically speed up integration into your software application ef core is currently the most popular orm https en wikipedia org wiki object e2 80 93relational mapping framework for microsoft net advantages you have the following advantages you will quickly arrive at an object oriented database model for your net software application ef core provides automatic code generation of entity classes models and the dbcontext class connection to the database by using partial classes and virtual properties the generated code is flexibly extendable by own logic ef core supports linq queries and change tracking of your records among other things relational reference database the following entity relationship diagram shows the structure of the reference database used in the following p align center img width 220px src img database entity diagram png p the database shown could be the basis of a calendar application in which a user can manage appointments in his calendar and then provide them with reminders the tables are connected by a 1 n relation you can create the reference database using the ddl script db server conf sql https github com djek sweng blog scaffold dbcontext efcore blob main tools mysql init db server conf sql getting started provided you have docker https www docker com installed on your machine you can run the reference database on a mysql https www mysql com server inside a docker container to do this simply start the docker engine and then run the shell script run mysql server sh https github com djek sweng blog scaffold dbcontext efcore blob main run mysql server sh you can then use the following connection string to connect your applications to the database txt server localhost port 4200 username root password password database db scaffold efcore if you have installed a mysql database server on your computer then you can also use this but make sure that you have an appropriate configuration create and set up project for code generation at the beginning you have to install ef core once on your computer sh bin sh dotnet tool install global dotnet ef for the reference database ef core can now generate the appropriate code to do this you create a classlib project in advance and then add the necessary packages sh bin sh lib scaffold library create project dotnet new classlib n lib add required packages cd lib dotnet add package microsoft entityframeworkcore dotnet add package microsoft entityframeworkcore design dotnet add package microsoft entityframeworkcore relational dotnet add package pomelo entityframeworkcore mysql the packages give you access to the ef core base and design time components furthermore components for the integration of relational databases as well as pomelo s mysql database provider are available for ef core create shell script for code generation in the next step you create a shell script that you can use for automatic code generation of the entity classes and the dbcontext class the following code block shows you an example of the options available for configuring the code generator and how it is started the project can be compiled directly after code generation sh bin sh file ef dbcontext scaffold sh configure code generator required connection server localhost port 4200 username root password password database db scaffold efcore provider pomelo entityframeworkcore mysql configure code generator optional context databasecontext context dir data generated context namespace scaffold library data output dir models generated namespace scaffold library models start code generation dotnet ef dbcontext scaffold connection provider context context context dir context dir context namespace context namespace output dir output dir namespace namespace force build project dotnet build the specification of the database connection connection and the database provider provider are mandatory all other specifications are optional and freely configurable according to your requirements the following table describes the options shown additional options are documented on the microsoft docs https docs microsoft com en us ef core cli dotnet common options website option description context name of the dbcontext class context dir directory of the dbcontext class relative to the project directory context namespace namespace of the dbcontext class output dir directory of the entity classes relative to the project directory namespace namespace of the entity classes force forces overwriting of existing files analysis of the generated code following the code generation we analyze the entity class meeting as an example see the following code block csharp generated file meeting cs using system using system collections generic namespace scaffold library models public partial class meeting public meeting reminders new hashset reminder public uint id get set public string title get set null public string description get set public datetime createdat get set public datetime changedat get set public datetime startat get set public uint duration get set public uint calendarid get set public virtual calendar calendar get set null public virtual icollection reminder reminders get set the namespace matches the configuration the entity class meeting is partial and has a public constructor that initializes the navigation property reminders furthermore the entity class has auto implemented public property accessors optional fields or fields automatically set by the database correspond to nullable properties e g description or createdat the navigation properties calendar and reminders are virtual furthermore the code generator converts the sql conform snake case notation changed at into net conform pascal case notation changedat you can also find the complete generated code in the github repository https github com djek sweng blog scaffold dbcontext efcore blob main src scaffold library flexible enhancement of the generated code due to the partial modifiers all generated classes are flexibly extendable by own code so you can easily extend the entity class meeting with your own methods and implement them in a separate file when code is generated again your own code is not lost the following code block shows a factory method create that can create new instances the method isstartinfuture can determine if the start time startat of a meeting is in the future csharp file meeting cs using system namespace scaffold library models public partial class meeting public static meeting create string title string description uint duration datetime startat uint calendarid return new meeting title title description description duration duration startat startat calendarid calendarid public bool isstartinfuture return startat datetime utcnow if you want to use the entity class meeting as parent class then a child class derived from it can override the behavior of the auto implemented virtual navigation properties calendar and reminders you can find an example of this on the microsoft docs https docs microsoft com en us dotnet csharp language reference keywords virtual website application example proof of concept in a small sample application you show that the code from the classlib project created above can easily be integrated into an executable application to do this you create a console project and then add the necessary references and packages sh bin sh lib scaffold library app scaffold app create project dotnet new console n app add required reference dotnet add app app csproj reference lib lib csproj add required packages cd app dotnet add package microsoft entityframeworkcore dotnet add package microsoft entityframeworkcore relational the console application in program cs could run the following method startminimal in this method records for the entities calendar meeting and reminder are added to the database via the databasecontext used the factory methods create and isstartinfuture implemented by us are also used here csharp file demo cs using system using system linq using scaffold library data using scaffold library models namespace scaffold app public static class demo public static void startminimal add database context into scope using var context new databasecontext add calendar var calendar calendar create owner arthur dent context calendars add calendar context savechanges add meeting to calendar var meeting meeting create title have lunch with zaphod beeblebrox description ford s semi half cousin likes tea duration 42 startat datetime utcnow adddays 10 calendarid calendar id context meetings add meeting context savechanges check meeting start date console writeline does meeting meeting title start in future meeting isstartinfuture add reminders to meeting context reminders addrange reminder create remindbefore 4 meetingid meeting id reminder create remindbefore 2 meetingid meeting id context savechanges if you run the application example using docker and run mysql server sh https github com djek sweng blog scaffold dbcontext efcore blob main run mysql server sh then you can open the database adminer https www adminer org en in your browser via the url http localhost 4300 you can also find the sample application shown here and another one in the github repository https github com djek sweng blog scaffold dbcontext efcore blob main src scaffold app conclusion the discussed example shows you the first steps on the way to integrate an existing relational database system into your net software application the main effort is to set up a suitable project structure and implement some shell scripts for automatic code generation using the ef core cli additional steps will certainly be necessary but the effort will be worth it after successful integration powerful ef core functionalities such as linq queries and change tracking of your data sets will be available to you you can find the complete code in this github repository happy coding | csharp dotnet efcore mysql | server |
awesome-nlp-papers | awesome nlp papers this is a collection reading list of awesome natural language processing papers sorted by date 2018 x unsupervised machine translation using monolingual corpora only lample et al paper https arxiv org abs 1711 00043 x on the dimensionality of word embeddings yin et al paper https papers nips cc paper 7368 on the dimensionality of word embedding x an efficient framework for learning sentence representations logeswaran et al paper https arxiv org abs 1803 02893 x refining pretrained word embeddings using layer wise relevance propagation akira utsumi paper http aclweb org anthology d18 1520 x domain adapted word embeddings for improved sentiment classification sarma et al paper https arxiv org abs 1805 04576 x in domain context aware token embeddings improve biomedical named entity recognition sheikhshab et al paper http www aclweb org anthology w18 5618 x generalizing word embeddings using bag of subwords zhao et al paper https arxiv org abs 1809 04259 x what s in your embedding and how it predicts task performance rogers et al paper http www aclweb org anthology c18 1228 x on learning better word embeddings from chinese clinical records study on combining in domain and out domain data wang et al paper http www aclweb org anthology w18 2323 x predicting and interpreting embeddings for out of vocabulary words in downstream tasks garneau et al paper http www aclweb org anthology w18 5439 x addressing low resource scenarios with character aware embeddings papay et al paper http www aclweb org anthology w18 1204 x domain adaptation for disease phrase matching with adversarial networks liu et al paper http www aclweb org anthology w18 2315 x investigating effective parameters for fine tuning of word embeddings using only a small corpus komiya et al paper http www aclweb org anthology w18 3408 x bert pre training of deep bidirectional transformers for language understanding devlin et al paper https arxiv org abs 1810 04805 x adapting word embeddings from multiple domains to symptom recognition from psychiatric notes zhang et al paper https www ncbi nlm nih gov pmc articles pmc5961810 evaluation of sentence embeddings in downstream and linguistic probing tasks perone et al paper https arxiv org abs 1806 06259 universal sentence encoder cer et al paper https arxiv org abs 1803 11175 x deep contextualized word representations peters et al paper https arxiv org abs 1802 05365 x learned in translation contextualized word vectors mccann et al paper https arxiv org abs 1708 00107 x concatenated p mean word embeddings as universal cross lingual sentence representations r ckl et al paper https arxiv org abs 1803 01400 x a compressed sensing view of unsupervised text embeddings bag of n grams and lstms arora et al paper https openreview net pdf id b1e5ef c 2017 x attention is all you need vaswani et al paper http papers nips cc paper 7181 attention is all you need x skip gram zipf uniform vector additivity gittens et al paper http www aclweb org anthology p17 1007 x a simple but tough to beat baseline for sentence embeddings arora et al paper https openreview net pdf id syk00v5xx x fast and accurate entity recognition with iterated dilated convolutions strubell et al paper https arxiv org abs 1702 02098 x advances in pre training distributed word representations mikolov et al paper https arxiv org abs 1712 09405 x replicability analysis for natural language processing testing significance with multiple datasets dror et al paper https arxiv org abs 1709 09500 2016 x towards universal paraphrastic sentence embeddings wieting et al paper https arxiv org abs 1511 08198 x bag of tricks for efficient text classification joulin et al paper https arxiv org abs 1607 01759 x enriching word vectors with subword information bojanowski et al paper https arxiv org abs 1607 04606 x assessing the corpus size vs similarity trade off for word embeddings in clinical nlp kirk roberts paper http www aclweb org anthology w16 4208 x how to train good word embeddings for biomedical nlp chiu et al paper http www aclweb org anthology w16 2922 x log linear models memms and crfs michael collins paper http www cs columbia edu mcollins crf pdf x counter fitting word vectors to linguistic constraints mrk i et al paper https arxiv org abs 1603 00892 x google s neural machine translation system bridging the gap between human and machine translation wu et al paper https arxiv org abs 1609 08144 2015 semi supervised sequence learning dai et al paper https arxiv org abs 1511 01432 x evaluating distributed word representations for capturing semantics of biomedical concepts th et al paper http www aclweb org anthology w15 3820 2014 x glove global vectors for word representation pennington et al paper https www aclweb org anthology d14 1162 x linguistic regularities in sparse and explicit word representations levy and goldberg paper https www cs bgu ac il yoavg publications conll2014analogies pdf x neural word embedding as implicit matrix factorization levy and goldberg paper https papers nips cc paper 5477 neural word embedding as implicit matrix factorization pdf x word2vec explained deriving mikolov et al s negative sampling word embedding method goldberg and levy paper https arxiv org abs 1402 3722 x what s in a p value in nlp s gaard et al paper http www aclweb org anthology w14 1601 x how transferable are features in deep neural networks yosinski et al paper http papers nips cc paper 5347 how transferable are features in deep n e2 80 a6 x improving lexical embeddings with semantic knowledge yu et al paper http www aclweb org anthology p14 2089 x retrofitting word vectors to semantic lexicons faruqui et al paper https arxiv org abs 1411 4166 2013 x efficient estimation of word representations in vector space mikolov et al paper https arxiv org pdf 1301 3781 pdf x linguistic regularities in continuous space word representations mikolov et al paper https www aclweb org anthology n13 1090 x distributed representations of words and phrases and their compositionality mikolov et al paper https arxiv org abs 1310 4546 2012 x an empirical investigation of statistical significance in nlp berg kirkpatrick et al paper https dl acm org citation cfm id 2391058 2010 x word representations a simple and general method for semi supervised learning turian et al paper https dl acm org citation cfm id 1858721 2008 a unified architecture for natural language processing deep neural networks with multitask learning collobert and weston paper https ronan collobert com pub matos 2008 nlp icml pdf 2006 x domain adaptation with structural correspondence learning blitzer et al paper https dl acm org citation cfm id 1610094 2003 x a neural probabilistic language model bengio et al paper http www jmlr org papers volume3 bengio03a bengio03a pdf 1986 distributed representations hinton et al paper https web stanford edu jlmcc papers pdp chapter3 pdf | nlp deep-learning machine-learning papers reading-list | ai |
serverless-client-s3 | deprecation notice the npm package of this project is not compatiable with v1 0 of the serverless framework please use serverless finch https github com fernando mc serverless finch for an updated fork of this project serverless client s3 serverless http public serverless com badges v3 svg http www serverless com gitter https img shields io gitter room serverless serverless svg https gitter im serverless serverless version https img shields io npm v serverless client s3 svg https www npmjs com package serverless client s3 downloads https img shields io npm dm serverless client s3 svg https www npmjs com package serverless client s3 dependencies https img shields io david serverless serverless client s3 svg https www npmjs com package serverless client s3 license https img shields io npm l serverless client s3 svg https www npmjs com package serverless client s3 a serverless plugin that deploys a web client for your serverless project to an s3 bucket and make it publicaly available in seconds first install npm install save serverless client s3 second update serverless yml by adding the following yaml plugins serverless client s3 custom client bucketname serverless client bucketname warning the plugin will overwrite any data you have in the bucket name you set above if it already exists third create a client dist folder in the root directory of your serverless project this is where your distribution ready website should live it is recommended to have a client src where you ll be developing your website and a build script that outputs to client dist the plugin simply expects and uploads the entire client dist folder to s3 configure the bucket to host the website and make it publicly available or just copy run the following commands in the root directory of your serverless project to get a quick sample website for deployment mkdir p client dist touch client dist index html touch client dist error html echo go serverless client dist index html echo error page client dist error html fourth run the plugin and visit your new website serverless client deploy stage stage region region fifth have fun | front_end |
|
xmodem | embedded xmodem build status https img shields io travis bsail xmodem master svg https travis ci org bsail xmodem coverage status https img shields io coveralls github bsail xmodem master svg https coveralls io github bsail xmodem branch master fork of original library by caseykelso https github com caseykelso xmodem forked by nikolay nerovny bmstu 2018 latest version of library https github com bsail xmodem development for developers looking to extend bug fix build and test libxmodem with dependencies and test infrastructure included in the source tree this version differs from original version by caseykelso https github com caseykelso xmodem it uses ceedling build system with unity tests this library has several changes in transmitter state machine in order to properly work with rz utility it did not wait for c it starts transmission from the beginning setup environment ubuntu 16 04 18 04 bash sudo apt install build essential git ruby sudo gem install ceedling get code bash mkdir xmodem git clone https github com bsail xmodem xmodem ceedling upgrade xmodem cd xmodem tests unit tests build run unit tests bash ceedling test all you may use and create additional tasks for ceedling build system please refer to the documentation in the vendor ceedling docs transmit state machine all transitions are covered via unit tests img src documentation xmodem transmit fsm png receive state machine all transitions are not yet covered via unit tests img src documentation xmodem receive fsm png project structure source directories src libxmodem source directory xmodem h common header transmitter and receiver xmodem c common implementation transmitter and receiver xmodem receiver h receiver side header xmodem receiver c receiver side implementation xmodem transmitter h transmitter side header xmodem transmitter c transmitter side implementation test test xmodem c unity test file for xmodem c module use ceedling test xmodem to run tests only in this source file test xmodem receiver c unity test file for xmodem receiver c module use ceedling test xmodem receiver to run tests only in this source file test xmodem transmitter c unity test file for xmodem transmitter c module use ceedling test xmodem transmitter to run tests only in this source file readme md this file project yml ceedling project file including parameters of test compiler and linker gitignore definitions of files and directories to be ignored by git third party source directories vendor ceedling source with documentation and plugins build directories build ceedling library build directory additional directories documentation source of state machine schematics reference reference documentation about xmodem protocol | xmodem ceedling c rtos embedded | os |
Lumina-Smart-Blinds | lumina smart blinds capstone project embedded software for engphys 4a06 engineering physics design and synthesis project fall 2022 winter 2023 setup notes after cloning the repository and opening it in visual studio code install the following extensions if you haven t already c c c c extension pack c c themes platformio ide clang format doxygen documentation generator gitlens you will also have to install the llvm compiler https github com llvm llvm project releases download llvmorg 15 0 1 llvm 15 0 1 win64 exe to use clang format an automatic code formatter for c c after installing place the path of the executable file under the clang format executable setting under the clang format extension settings in visual studio code for example d llvm bin clang format exe if all is successful you should see the code format itself when you save changes to a file br br author sean alimdjanov with assistance from malik awan and ashhal syed location mcmaster university hamilton on canada | os |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.